Vue normale

Il y a de nouveaux articles disponibles, cliquez pour rafraîchir la page.
À partir d’avant-hierSharePoint

Windows Server 2025 Core and Docker – A Modern Container Host Architecture

As businesses race toward cloud-native infrastructure and microservices, Windows Server 2025 Core emerges as a lean, powerful platform for hosting Docker containers. With its minimal footprint and robust security posture, Server Core paired with Docker offers a compelling solution for modern application deployment.

Architecture Design: Windows Server Core + Docker

Windows Server 2025 Core is a headless, GUI-less version of Windows Server designed for performance and security. When used as a Docker container host, it provides:

  • Lightweight OS footprint: Reduces attack surface and resource consumption.
  • Hyper-V isolation: Enables secure container execution with kernel-level separation.
  • Support for Nano Server and Server Core images: Ideal for running Windows-based microservices.
  • Integration with Azure Kubernetes Service (AKS): Seamless orchestration in hybrid environments.

Key Components

Component Role in Architecture
Windows Server 2025 Core Host OS with minimal services
Docker Engine Container runtime for managing containers
Hyper-V Optional isolation layer for enhanced security
PowerShell / CLI Tools Management and automation
Windows Admin Center GUI-based remote management

Installation Guide

Setting up Docker on Windows Server 2025 Core is straightforward but requires precision. Here’s a simplified walkthrough:

Windows Server 2025 Datacenter Core running

  1. Install Required Features

Use PowerShell to install Hyper-V and Containers features:

Install-WindowsFeature -Name Hyper-V, Containers -IncludeManagementTools -Restart

  1. Install Docker

Download and install Docker from the official source or use the PowerShell script provided by Microsoft:

Invoke-WebRequest “https://download.docker.com/win/static/stable/x86_64/docker-28.4.0.zip” -OutFile “docker.zip”

Unzip and configure Docker as a service:

at Docker directory to your path

Add the Docker config directory

Set the daemon

Create the Docker Service

net start docker

docker version

Docker Host on Windows Server 2025 Core is Installed 😉

  1. Configure Networking

Ensure proper NAT or transparent networking for container communication.

  1. Pull Base Images

Use Docker CLI to pull Windows container images:

docker pull mcr.microsoft.com/windows/servercore:ltsc2025

  1. Test Deployment

Run a sample Windows Server 2025 core container:

docker run -it mcr.microsoft.com/windows/servercore:ltsc2025

Inside the Windows Server 2025 Core Container on the Docker host.

Best Practices

To maximize reliability, security, and scalability:

  • Use Hyper-V isolation for sensitive workloads.
  • Automate deployments with PowerShell scripts or CI/CD pipelines.
  • Keep base images updated to patch vulnerabilities.
  • Monitor containers using Azure Arc monitoring or Windows Admin Center.
  • Limit container privileges and avoid running as Administrator.
  • Use volume mounts for persistent data storage.

Conclusion: Why It Matters

For developers, Windows Server 2025 Core with Docker offers:

  • Fast iteration cycles with isolated environments.
  • Consistent dev-to-prod workflows using container images.
  • Improved security with minimal OS footprint and Hyper-V isolation.

For businesses, the benefits are even broader:

  • Reduced infrastructure costs via efficient resource usage.
  • Simplified legacy modernization by containerizing Windows apps.
  • Hybrid cloud readiness with Azure integration and Kubernetes support.
  • Scalable architecture for microservices and distributed systems.

Windows Server 2025 Core isn’t just a server OS—it’s a launchpad for modern, secure, and scalable containerized applications. Whether you’re a developer building the next big thing or a business optimizing legacy systems, this combo is worth the investment.

Integrating Azure Arc into the Windows Server 2025 Core + Docker Architecture for Adaptive Cloud

Overview

Microsoft Azure Arc extends Azure’s control plane to your on-premises Windows Server 2025 Core container hosts. By onboarding your Server Core machines as Azure Arc–enabled servers, you gain unified policy enforcement, monitoring, update management, and GitOps-driven configurations—all while keeping workloads close to the data and users.

Architecture Extension

  • Azure Connected Machine Agent
    Installs on Windows Server 2025 Core as a Feature on Demand, creating an Azure resource that represents your physical or virtual machine in the Azure portal.
  • Control Plane Integration
    Onboarded servers appear in Azure Resource Manager (ARM), letting you apply Azure Policy, role-based access control (RBAC), and tag-based cost tracking.
  • Hybrid Monitoring & Telemetry
    Azure Monitor collects logs and metrics from Docker Engine, container workloads, and host-level performance counters—streamlined into your existing Log Analytics workspaces.
  • Update Management & Hotpatching
    Leverage Azure Update Manager to schedule Windows and container image patches. Critical fixes can even be applied via hotpatching on Arc-enabled machines without a reboot.
  • GitOps & Configuration as Code
    Use Azure Arc–enabled Kubernetes to deploy container workloads via Git repositories, or apply Desired State Configuration (DSC) policies to Server Core itself.

Adaptive Cloud Features Enabled

  • Centralized Compliance
    Apply Azure Policies to enforce security baselines across every Docker host, ensuring drift-free configurations.
  • Dynamic Scaling
    Trigger Azure Automation runbooks or Logic Apps when performance thresholds are breached, auto-provisioning new container hosts.
  • Unified Security Posture
    Feed security alerts from Microsoft Defender for Cloud into Azure Sentinel, correlating threats across on-prem and cloud.
  • Hybrid Kubernetes Orchestration
    Extend AKS clusters to run on Arc-connected servers, enabling consistent deployment pipelines whether containers live on Azure or in your datacenter.

More information about Innovate on an Adaptive Cloud here

Integration Walkthrough

  1. Prepare your Server Core host (ensure Hyper-V, Containers, and Azure Arc Feature on Demand are installed).
  2. Install Azure Arc agent via Azure PowerShell
  3. In the Azure portal, navigate to Azure Arc > Servers, and verify your machine is onboarded.
  4. Enable Azure Policy assignments, connect to a Log Analytics workspace, and turn on Update Management.
  5. (Optional) Deploy the Azure Arc GitOps operator for containerized workloads across hybrid clusters.

Visualizing Azure Arc in Your Diagram

Above your existing isometric architecture, add a floating “Azure Cloud Control Plane” layer that includes:

  • ARM with Policy assignments
  • Azure Monitor / Log Analytics
  • Update Manager + Hotpatch service
  • GitOps repo integrations

Draw data and policy-enforcement arrows from this Azure layer down to your Windows Server Core “building,” Docker cube, container workloads, and Hyper-V racks—demonstrating end-to-end adaptive management.

Why It Matters

Integrating Azure Arc transforms your static container host into an adaptive cloud-ready node. You’ll achieve:

  • Consistent governance across on-prem and cloud
  • Automated maintenance with zero-downtime patching
  • Policy-driven security at scale
  • Simplified hybrid Kubernetes and container lifecycle management

With Azure Arc, your Windows Server 2025 Core and Docker container hosts become full citizens of the Azure ecosystem—securing, monitoring, and scaling your workloads wherever they run.

Better Together 🐳

 

Celebrating 15 Remarkable Years in the Microsoft MVP Community

Dear Community Members, Friends, and Colleagues,

As I mark my 15th anniversary in the Microsoft MVP program, I’m filled with immense gratitude, humility, and pride. What began as a passion for sharing knowledge and building connections has blossomed into a deeply rewarding journey—one shaped by innovation, collaboration, and the extraordinary people who make this community thrive.

Over these 15 years, I’ve had the privilege to learn from brilliant minds, contribute to inspiring projects, and witness the transformative power of technology firsthand. Whether through speaking engagements, blog posts, mentoring, or hands-on technical work, being part of the MVP program has continually deepened my commitment to empowering others and fostering open, inclusive collaboration.

To the community: thank you for challenging, supporting, and celebrating with me. Your curiosity, creativity, and kindness are what keep this ecosystem alive and forward-looking.

To Microsoft: thank you for the honor and trust. The MVP program is a unique platform that amplifies voices, nurtures growth, and builds bridges—not just between developers and users, but between ideas and action.

While this milestone is a moment to reflect, it’s also a reminder that there’s always more to explore, create, and share. I look forward to continuing this journey together—with the same spark, but even greater purpose.

With heartfelt appreciation,
James

Here are some photos with Awesome people that I have met during these years:

Here you see Vijay Tewari in the middle who nominated me for the first time 🙂
Damian Flynn on the left and me on the right are Microsoft MVPs for Virtual Machine Manager (VMM)
at that time in 2011.

Here you see Tina Stenderup-Larsen in the middle, she is amazing! A Great Microsoft Community Program Manager
supporting all the MVPs in the Nordics & Benelux doing an Awesome Job!
On the right is Robert Smit a Great Dutch MVP and friend.

Mister OMS alias Scripting Guy Ed Wilson.

When there is a Microsoft Windows Server event, there is Jeff Woolsey 😉
“The three Musketeers”

Meeting Brad Anderson, he had great lunch breaks interviews in his car
with Awesome people.

The Azure Stack Guys on the 25th MVP Global Summit 😊

Mister PowerShell Jeffrey Snover at the MVP Summit having fun 😂

Scott Guthrie meeting him at the Red Shirt Tour in Amsterdam.

Great to meet Yuri Diogenes in 2018 with his book Azure Security Center.
I know him from the early days with Microsoft Security, like ISA Server 😉

Mister Azure, CTO Mark Russinovich meeting at the MVP Global Summit in Redmond.
a Great Technical Fellow with Awesome Azure Adaptive Cloud Solution Talks!

Mister DevOps himself Donovan Brown in Amsterdam for DevOps Days

My friend Rick Claus Mister MS Ignite.

Mister Azure Corey Sanders at the MVP Summit.

Mister Channel 9, MSIgnite, AI Specialist Seth Juarez
He is a funny guy.

Meeting Scott Hanselman in the Netherlands together with MVP Andre van den Berg.
Scott is Awesome in developer innovations and technologies.
Following Azure Friday from the beginning.

Windows Insider friends for ever meeting Scott Hanselman.
With on the left MVP Erik Moreau.

Windows Insiders for Ever 💙
Here together with Dona Sarkar here in the Netherlands

Windows Insider Friends having fun with Ugly Sweater meeting.
On the right my friend Maison da Silva and on the upper right Erik Moreau and Andre van den Berg.
Friends for Life 💙

Microsoft Global MVP 15 Years Award disc is in the House 🫶
on Monday the 14th of July 2025.

Thank you All 💗

Happy Anniversary Day 50 years of Microsoft Innovation

50 years of Microsoft

A Legacy of Innovation and Transformation

Half a century ago, on April 4th, 1975, two young visionaries, Bill Gates and Paul Allen, co-founded Microsoft with a bold ambition: to make computing accessible and essential for everyone. What began as a small software company has grown into a global technology leader, continuously transforming industries and empowering billions of lives. As we celebrate Microsoft’s 50-year journey, let’s explore its milestones, innovations, and impact, including its contributions to datacenters, Windows Server, Hyper-V, Azure, and the leadership of its CEOs.

The Early Years: Coding the Future

Microsoft’s first big breakthrough came with the creation of an operating system for the fledgling personal computer market. In 1980, the company introduced MS-DOS, laying the groundwork for the revolutionary Windows operating system, launched in 1985. This graphical interface transformed computing, making it accessible to both businesses and individuals.

Guiding Microsoft Through Its Evolution: The CEOs Who Shaped the Company

Microsoft’s trajectory has been shaped by its visionary leadership. From the founders to the present, each CEO has left an indelible mark:

  1. Bill Gates (1975–2000): As co-founder and first CEO, Gates spearheaded the company’s initial growth, launching pivotal products like MS-DOS, Windows, and Office. His focus on innovation and accessibility built the foundation of Microsoft’s success.
  2. Steve Ballmer (2000–2014): During his tenure, Ballmer led Microsoft through massive expansion, particularly in enterprise solutions and cloud computing. He introduced Windows Server and laid the groundwork for services like Azure. Ballmer’s energy and passion defined his leadership style and kept Microsoft competitive in a rapidly changing market.
  3. Satya Nadella (2014–Present): Nadella ushered in a cloud-first, AI-driven era, transforming Microsoft’s culture and business model. His emphasis on inclusivity, empathy, and sustainability revitalized the company. Under his leadership, Azure became one of the world’s leading cloud platforms, and Microsoft made transformative acquisitions like LinkedIn, GitHub, and Activision Blizzard.

Lake Bill on Redmond Campus

Redefining Enterprise Technology: Datacenters, Windows Server, and Virtualization

As businesses increasingly relied on technology, Microsoft expanded its offerings to support enterprise needs. Windows Server, introduced in 1993, became a cornerstone for server management and networking. It evolved over the decades, incorporating features such as Active Directory, high availability, and security enhancements.

Microsoft played a pivotal role in virtualization with Hyper-V, launched in 2008. Hyper-V allowed organizations to maximize resource efficiency and reduce costs by running multiple virtual machines on a single physical server. Modern datacenters powered by Microsoft’s hardware and software solutions now form the backbone of its cloud services.

Embracing the Cloud: The Azure Revolution

Microsoft’s Azure cloud platform, launched in 2010, redefined computing. It enabled organizations to access scalable infrastructure, deploy applications globally, and harness artificial intelligence with ease. Azure spans over 60 regions worldwide, making it one of the most comprehensive cloud platforms. Its ecosystem includes hybrid cloud solutions, advanced analytics, and IoT technologies.

Gaming, Devices, and Consumer Innovation

Microsoft entered the gaming industry with the Xbox in 2001, creating a thriving gaming ecosystem. Beyond gaming, the company innovated with devices like the Surface lineup, combining sleek design with productivity. Its integration of hardware and software demonstrated Microsoft’s versatility.

Shaping the Future: AI, Sustainability, and Datacenters

Microsoft continues to lead in artificial intelligence with tools like Microsoft Copilot. Its pledge to be carbon-negative by 2030 highlights environmental responsibility, with sustainable datacenter operations playing a central role.

Conclusion: A Legacy Built to Inspire

Microsoft’s 50-year journey is a testament to the power of innovation and visionary leadership. From Bill Gates to Steve Ballmer to Satya Nadella, each CEO has steered the company to new heights. With contributions ranging from datacenters and Windows Server to Hyper-V and Azure, Microsoft’s impact has been profound. As the company looks ahead, it remains dedicated to empowering people and organizations to achieve more, ensuring the next 50 years are as groundbreaking as the last.

Here’s to Microsoft—a company built to inspire and shape the future.

at Building 92 of the Microsoft Campus in Redmond.

 

Identifier les comptes inutilisés

Hi folks,

Souvent on me demande s’il est possible de trouver les comptes des utilisateurs non utilisés, je vous propose ici de voir cela avec un exemple des comptes invités qui sont en grande partie non utilisés sur les environnements, ou bien qui sont utilisés très ponctuellement.

Notre objectif est donc de les identifier et les gérer, notamment en les ajoutant à un groupe pour faciliter leur suppression ou autre action. Mais surtout pas de tous les supprimer… Après vous avez la sauvegarde peut-être sinon c’est dans la corbeille Entra ID pour 30 jours.

1. Créer un groupe cible

  • Créez une liste de distribution ou un groupe Microsoft 365 pour regrouper les comptes invités inactifs.
  • Vous pouvez utiliser le centre d’administration Exchange/Microsoft 365 ou des cmdlets PowerShell tels que :
    • New-DistributionGroup pour une liste de distribution.
    • New-UnifiedGroup pour un groupe Microsoft 365.

2. Identifier les comptes invités inutilisés :

  • Utilisez le cmdlet Get-MgUser du Microsoft Graph PowerShell SDK pour récupérer les comptes invités.
  • Filtrez les comptes :
    • Ceux qui n’ont pas signé depuis plus d’un an.
    • Ceux qui n’ont jamais signé (optionnel) mais souvent le cas.
  • Exemple de script pour filtrer :
    • $CheckDate = (Get-Date).AddYears(-1)
    • [array]$InactiveGuests = Get-MgUser -All -PageSize 500 -Filter "signInActivity/lastSignInDateTime le $($Checkdate.ToUniversalTime().ToString("yyyy-MM-ddThh:mm:ssZ"))" -Property Id, Mail, displayName, userPrincipalName, signInactivity, UserType
    • $InactiveGuests = $InactiveGuests | Where-Object {$_.userType -eq 'Guest'}
  • Éliminez les faux positifs en filtrant les comptes sans adresse e-mail.
    • $InactiveGuests = $InactiveGuests | Where-Object {$null -ne $_.Mail}

3. Ajouter les comptes inutilisés à un groupe :

  • Pour une liste de distribution :
    • ForEach ($Id in $InactiveGuests.Id) { Add-DistributionGroupMember -Identity Inactive.Guests.DL -Member $Id -ErrorAction SilentlyContinue }
  • Pour un groupe Microsoft 365 :
    • Add-UnifiedGroupLinks -Identity Inactive.Guests.Group -Links $InactiveGuests.Id -LinkType Member
  • Désactivez les messages de bienvenue pour éviter de confondre les utilisateurs :
    • Set-UnifiedGroup -Identity Inactive.Guests.Group -UnifiedGroupWelcomeMessageEnabled:$False

4. Automatisation et suivi :

  • Planifiez un traitement régulier (par exemple, via un runbook Azure Automation) pour maintenir la liste des invités inactifs à jour.

Suppression des comptes :

  • Avant de supprimer, examinez les comptes pour éviter de retirer des comptes importants (par exemple, ceux utilisés uniquement pour des échanges par e-mail).
  • Exportez les données dans un fichier CSV pour validation avant suppression.
  • Exemple de script pour suppression :
    • [array]$InactiveGuests = Import-CSV "c:\temp\GuestAccountsToRemove.csv" ForEach ($Account in $InactiveGuests) { Remove-MgUser -UserId $Account.Id }

Remarques :

  • Tous les comptes inactifs ne doivent pas être supprimés automatiquement. Certains peuvent avoir une raison valable d’être inactifs.
  • La suppression est réversible pendant 30 jours via l’interface Entra Admin Center.
  • MAIS SURTOUT – Pensez a mettre en place de la gouvernance des identités.

Stay tuned !

A little Christmas Story

Once upon a time, in a world where technology and holiday cheer intertwined, there was a bustling community of developers eagerly awaiting the latest updates from the Microsoft Windows 11 and Windows Server Insider programs. As the festive season approached, the air was filled with excitement and anticipation.

In the heart of this community were the Microsoft MVPs (Most Valuable Professionals) and Docker Captains, who were known for their expertise and passion for technology. They decided to come together to create something truly magical for developers around the world.

One snowy evening, as the MVPs and Docker Captains gathered around a virtual fireplace, they began to brainstorm ideas. “What if we could combine the power of Windows 11, Windows Server, and Docker Containers to create a seamless development experience?” suggested one MVP, their eyes twinkling with excitement.

The idea quickly gained momentum, and soon, the group was hard at work. They envisioned a world where developers could effortlessly build, test, and deploy applications using the latest features of Windows 11 and Windows Server, all within the flexible and scalable environment of Docker Containers.

With the help of the Insider programs, they gained early access to cutting-edge features and updates. The MVPs and Docker Captains worked tirelessly, sharing their knowledge and expertise to create a series of tutorials, guides, and sample projects. These resources were designed to help developers harness the full potential of Windows 11, Windows Server, and Docker Containers.

As the holiday season progressed, the community began to see the fruits of their labor. Developers from all corners of the globe started to adopt the new tools and techniques, marveling at the ease and efficiency they brought to their workflows. The combination of Windows 11’s sleek interface, Windows Server’s robust capabilities, and Docker Containers’ flexibility created a harmonious symphony of technology.

To celebrate their success, the MVPs and Docker Captains organized a virtual holiday party. Developers joined from far and wide, sharing stories of their experiences and the innovative projects they had created. The virtual room was filled with laughter, camaraderie, and a shared sense of accomplishment.

As the night drew to a close, one of the Docker Captains raised a toast. “Here’s to the power of collaboration, the spirit of innovation, and the joy of the holiday season. May we continue to push the boundaries of technology and inspire developers everywhere.”

And so, the story of the Microsoft Windows 11 and Windows Server Insider Christmas, made possible by the dedication and expertise of the MVPs and Docker Captains, became a cherished tale in the developer community. It was a reminder that, with passion and teamwork, even the most ambitious dreams could come true.

Happy holidays, and may your coding adventures be merry and bright! 🎄💻🐳

My highlights Day 2 of Microsoft Ignite 2024

Microsoft Azure Adaptive Cloud approach enabled by Azure Arc.

Adaptive Cloud approach Key Services and Products.

Operate everywhere with AI-enhanced management and security

AI-enhanced Central Management & Security

Get Started with Azure Arc Jumpstart here

Welcome to the heart of our mission at Azure Arc Jumpstart, where we strive to transform your learning experience into a smooth and empowering journey. Our commitment is rooted in the principles that drive us forward:

  1. Enabling immediate engagement: Arc Jumpstart is designed to offer a seamless “zero to hero” experience. We understand the value of your time, and our goal is to enable you to dive right into Azure Arc, eliminating barriers and complexities.

  2. Comprehensive guidance: We provide more than just guides; we offer comprehensive, step-by-step instructions tailored for various independent Azure Arc scenarios. Our content is meticulously detailed, incorporating extensive automation, vivid screenshots, and insightful code samples. This ensures that your learning journey is not just informative but also visually enriching and deeply engaging.

  3. Unparalleled user experience: Our dedication lies in delivering a rich and immersive experience. We go beyond the basics, curating a user-centric environment that resonates with both beginners and seasoned professionals. Whether you’re setting up your environment on-premises or in the cloud, our guides empower you to focus on Azure Arc’s core values without being bogged down by technical intricacies.

  4. Embracing platform flexibility: We recognize the diversity of your infrastructure, and our mission is to provide a platform-agnostic approach. Arc Jumpstart accommodates your infrastructure, whether it resides on-premises or in the cloud. Our focus is to ensure that regardless of your setup, you can harness the true potential of the Azure Arc platform effortlessly.

Investments to further the Adaptive Cloud Approach 🚀

Introducing Microsoft Azure Local enabled by Azure Arc

Scott Hanselman about Visual Studio and Copilot

More AI development in Visual Studio or VSCode

Microsoft Windows 365 Link

This is Awesome, my next question is:
How fast will this solution be on Mobile?

Windows Hotpatch will be Available Spring 2025
for Windows 11 and Windows 365.

Windows Resilient Security Platform

Quick Machine Recovery in Insider program early 2025.

Microsoft working together with Cybersecurity & Infrastructure Security Agency

Smart App Control only Verified apps are allowed.

Windows Hello for Business Update with support for passkey.

Administrator Protection.

Personal Data Encryption to Windows Enterprise
Only decrypted via Windows Hello

Microsoft 365 in File Explorer

Windows Search is Cool 😎
Coming in 2025

My Conclusion

Make your own test environment and become a Windows Insider to be one of the first to test these Awesome New features!
You can make this of course in Microsoft Azure Cloud or in your own Azure Local environment 🚀
There are so much possibilities, to keep yourself up-to-date with this changing IT landscape.

 

 

PowerShell & Microsoft 365

Hello folks,

Microsoft continue la sécurisation de ces environnements et par extension du votre, en effet depuis le 9 Septembre 2024, vous ne pourrez plus vus connecter “facilement” nous allons voir ensemble comment s’y connecter :

Step 1 : Enregistrement de l’application dans EntraID

Register-PnPEntraIDAppForInteractiveLogin -ApplicationName “PnP Rocks” -Tenant [votretenant].onmicrosoft.com -Interactive

Step 2 : La connexion

Connect-PnPOnline -Url https://%5Bvotretenant%5D.sharepoint.com/sites/demo -Interactive -ClientId 61[….]36e

source : https://pnp.github.io/powershell/articles/registerapplication.html

Au temps dire que ce mode de connexion nécessitera la connaissance du clientID de l’application ou bien d’un certificat, le MFA étant devenu de rigueur pour tous. En tout cas les règles de déploiement de connexion par certificats vont revenir à l’ordre du jour, tout comme le fait d’appuyer encore sur les règles d’accès conditionnel.

Stay tuned & have fun !

Blog Post: [Microsoft Teams] Module powershell Microsoft Teams disponible en version 5.1.1 (Preview)

Microsoft a rendu disponible une nouvelle version du module powershell pour Microsoft Teams en version 5.1.1 (preview) Date: 13 Avril 2023 Release notes: https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-release-notes Lien: https://www.powershellgallery.com/packages/MicrosoftTeams/5.1.1-preview Release notes: - Adds Region parameter in the New-CsSdgBulkSignInRequest cmdlet in private preview. - Contains a new implementation of [New|Get|Set|Remove|Grant]-CsTeamsAppPermissionPolicy, [New|Get|Set|Remove|Grant]-CsTeamsAppSetupPolicy, [New|Get|Set|Remove|Grant]-CsTeamsEventsPolicy, [New|Get|Set|Remove|Grant]-CsExternalAccessPolicy, [New|Get|Set|Remove|Grant]-CsTeamsCallingPolicy. Functionality remains the same as previous implementation. Comment installer le module powershell MicrosoftTeams en version preview? Install-Module -Name MicrosoftTeams -AllowPrerelease Comment mettre à niveau votre module powershell vers cette version? Update-Module -Name MicrosoftTeams -AllowPrerelease Comment vérifier votre version installée powershell MicrosoftTeams? Get-InstalledModule

How to Delete a File with PowerShell Remove-Item

Deleting files and cleaning up directories can be a time-consuming task, especially when you need to perform the same task on multiple computers regularly. But with PowerShell, we can create small scripts that will delete a file quickly and efficiently by using the Remove-Item cmdlet. ... Read moreHow to Delete a File with PowerShell Remove-Item

The post How to Delete a File with PowerShell Remove-Item appeared first on LazyAdmin.

How to use Azure Managed Identity

Azure resources, like Azure Automation or Azure Virtual Machines, often need to have access to other resources. For example, when accessing the Azure AD from within a Runbook. To grant access, you usually need accounts, passwords, or certificates. But you don’t want to store this ... Read moreHow to use Azure Managed Identity

The post How to use Azure Managed Identity appeared first on LazyAdmin.

Blog Post: [Microsoft Teams] Module powershell Microsoft Teams disponible en version 5.0

Microsoft a rendu disponible aujourd'hui une nouvelle version du module powershell pour Microsoft Teams en version 5.0 C'est une nouvelle version majeur. Date: 02 Mars 2023 Release notes: https://docs.microsoft.com/fr-fr/MicrosoftTeams/teams-powershell-release-notes Lien: https://www.powershellgallery.com/packages/MicrosoftTeams/5.0.0 Release Notes: **5.0.0-GA** (The project - MicrosoftTeams contains changes till this release): - Releases major updates for Get-CsOnlineUser with significant performance improvements and new filtering capabilities to scenarios without the "-Identity" parameter (currently rolled out in commercial environments): - Performance improvements especially with "-Filter" scenarios like using wildcard operator (*), OnPrem* and Timestamp attributes. - New attributes have now been introduced in the output to ensure parity with scenarios involving the "-Identity" parameter: CountryAbbreviation, SipProxyAddress, TeamsMediaLoggingPolicy, UserValidationErrors, WhenCreated. - These attributes are now enabled for filtering: Alias, City, CompanyName, CompanyName, HostingProvider, UserValidationErrors, OnPremEnterpriseVoiceEnabled, OnPremHostingProvider, OnPremLineURI, OnPremSIPEnabled, SipAddress, SoftDeletionTimestamp, State, Street, TeamsOwnersPolicy, WhenChanged, WhenCreated, FeatureTypes, PreferredDataLocation, LastName. - These filtering operators have been reintroduced into Get-CsOnlineUser: - "-like" operator now supports use of wildcard operators in 'contains' and 'ends with' scenarios. Example: Get-CsOnlineUser -Filter "DisplayName -like '*abc*'" - "-contains" can now be used for filtering on properties that are an array of strings like FeatureTypes, ProxyAddresses and ShadowProxyAddresses. Example: Get-CsOnlineUser -Filter {FeatureTypes -contains "PhoneSystem"} - "-gt" (greater than), "-lt" (less than), "-le" (less than or equal to) can now be used for filtering all string properties. Example: Get-CsOnlineUser -Filter {UserPrincipalName -gt/-le/-lt "abc"} - "-ge" (greater than or equal to) can now also be used for filtering on policies. Example: Get-CsOnlineUser -Filter {ExternalAccessPolicy -ge "xyz_policy"} - Updates to type of users displayed: - Unlicensed Users - Unlicensed users would show up in the output for 30 days post license removal. - Soft deleted users - These users will be displayed in the output with SoftDeletionTimestamp set to a value. Comment installer ou mettre à jour votre module powershell Microsoft Teams Install-Module -Name MicrosoftTeams Si vous avez déja le module, vous pouvez mettre à niveau avec la commande: Update-Module MicrosoftTeams Get-InstalledModule

How to use PowerShell If Else Statements

If-Else statements are the basis of any programming language, also in PowerShell. They are used to test if a condition is met, allowing you to perform different actions based on the result. Multiple conditions, if-not statements, and else-if statements give you a variety of options ... Read moreHow to use PowerShell If Else Statements

The post How to use PowerShell If Else Statements appeared first on LazyAdmin.

Blog Post: [Microsoft Teams] Module powershell Microsoft Teams disponible en version 4.9.4 (Preview)

Microsoft a rendu disponible une nouvelle version du module powershell pour Microsoft Teams en version 4.9.4 (preview) Date: 22 février 2023 Release notes: https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-release-notes Lien: https://www.powershellgallery.com/packages/MicrosoftTeams/4.9.4-preview Les nouveautés: Releases Get-CsSDGBulkSignInRequestsSummary cmdlet in private preview. Adds Region attribute to Get-CsSdgBulkSignInRequestStatus output. Comment installer le module powershell MicrosoftTeams en version preview? Install-Module -Name MicrosoftTeams -AllowPrerelease Comment mettre à niveau votre module powershell vers cette version? Update-Module -Name MicrosoftTeams -AllowPrerelease Comment vérifier votre version installée powershell MicrosoftTeams? Get-InstalledModule

Using ShareGate PowerShell to Download SharePoint Content

You might be surprised by the title of this post. Isn’t our goal to get everyone’s content *into* SharePoint? Usually that’s the case, for sure.

But many times, in the course of a migration from an older (usually on premises) version of SharePoint, we identify whole sites or branches of subsites that simply don’t have any real purpose anymore. In some cases, we migrate the content into SharePoint Online, maybe into a site called Archive or similar. But other times we just want to save the content somewhere *in case* someone needs it. Which approach you take may hinge on your organizational culture, what storage mechanisms you have available, and the relative importance of the content – among many other things.

I’ve worked on a PowerShell script for this recently and used it for several different clients. With it, I can point at the top level of a branch of sites – maybe something like /sites/HR or /departments/Finance, and the script will download the content from that site, and recursively from all its subsites, etc. into a network location of my choosing, say C:\ or Z:\Archive.

I’ve run this script with both SharePoint 2010 and SharePoint 2016 as the source version, so I expect it will work for you in most cases.

The script is pretty straightforward because I use ShareGate’s PowerShell module to do all the heavy lifting: yet another reason why ShareGate rocks! If you have ShareGate installed on your machine, you have their PowerShell module as well, even if you didn’t realize it.

Note the ShareGate module requires you to be running PowerShell 5.x, NOT the more current PowerShell 7.x.

The script comes in two pieces:

  • downloadSite.ps1 – The script I actually run, after setting three variables appropriately.
  • downloadSiteFunctions.psm1 – A module with functions I call above. If you want to do recursion, you’ll need functions of some sort, and using a separate module gives some flexibility for reuse.

The parameter settings I show in the downloadSite.ps1 below were what I wanted for a particular scenario. When you read through downloadSiteFunctions.psm1 below, you’ll see what the impact of those settings is.

Import-Module -Name ShareGate # Requires ShareGate to be installed on the machine
Import-Module "./PowerShell/downloadSiteFunctions.psm1" -Force

# Setup
$sourceSiteName = "Name for the downloaded folder"
$sourceSiteUrl = "https://FarmOrTenantName/siteName/"

# The downloads will end up in a folder here named $sourceSiteName
$destTop = "Z:\" # Be sure to include a trailing backslash

# Any list or library in this array will be excluded from the downloads
$exclusionLists = @(
    "Content and Structure Reports",
    "Master Page Gallery",
    "Reusable Content",
    "Style Library",
    "Web Part Gallery",
    "Workflow Tasks",
    "Microfeed",
    "Site Pages",
    "Site Assets"
)

# Process root web
#   Delete existing folder - we assume we want to start from scratch
Remove-Item `
    -Path "$($destTop)$($sourceSiteName)" `
    -Recurse `
    -Force

#   Create new top-level folder
$top = New-Item `
    -Path "$($destTop)$($sourceSiteName)" `
    -ItemType Directory -Force

#   Export lists
Export-SympLists `
    -ParentFolder "$($top.FullName)" `
    -WebUrl $sourceSiteUrl `
    -Versions $false `
    -ExclusionLists $exclusionLists `
    -KeepEmpty $false `
    -KeepLists $true

# Process subwebs
Get-SympSubwebs `
    -ParentFolder "$($top.FullName)" `
    -WebUrl $sourceSiteUrl `
    -Versions $false `
    -ExclusionLists $exclusionLists `
    -KeepEmpty $false `
    -KeepLists $true

The downloadSiteFunctions.psm1 file might seem complicated, but it’s just two functions:

  • Export-SympLists – Exports all list/library contents from a web using ShareGate PowerShell functions. The ShareGate function Export-List is a workhorse. It exports ALL lists and libraries to folders. Even better, it creates an Excel file containing the inventory with all the metadata as well as the Document (libraries) or Attachments (lists).
  • Get-SympSubwebs – Gets the subwebs of any web and exports their list contents using ShareGate PowerShell functions. By calling itself as a last step, the function enables recursion. Essentially, it “walks” the subsite (web) topology from the current site (web) on down.
<#
.DESCRIPTION
   Exports list contents from a web using ShareGate PowerShell functions
.EXAMPLE
   Export-SympLists -ParentFolder $parentFolder -WebUrl $webUrl -Versions $versions
#>
function Export-SympLists {
   [CmdletBinding()]
   [Alias()]
   [OutputType([int])]
   Param
   (
      # Parent Folder
      [string]
      $ParentFolder,
 
      # Web URL
      [string]
      $WebUrl,
 
      # Versions - Should we download versions (or only the latest version) $true = all versions
      [boolean]
      $Versions = $false,
 
      # ExclusionLists - Array of list names to *skip* in the download
      [array]
      $ExclusionLists = @(),

      # KeepEmpty - Will create a folder for every library even if it is empty.
      # Setting this to $false will delete the empty folders.
      [boolean]
      $KeepEmpty = $false,

      # KeepLists - Will create a folder for every list even if it is empty.
      # Setting this to $true will keep all lists, regardless of their number of items.
      [boolean]
      $KeepLists = $false
 
   )
  
   Begin {
  
      Write-Host "Processing web $($WebUrl)"
 
   }
   Process {
  
      # ShareGate's Connect-Site
      $srcSite = Connect-Site $WebUrl

      # ShareGate's Get-List
      $srcLists = Get-List -Site $srcSite

      # Filter out the exclusionList items, if any
      foreach ($exclusionList in $ExclusionLists) {
         $newLists = $srcLists | Where-Object { $_.Title -ne $exclusionList } 
         $srcLists = $newLists
      }

      # If there's something to download, do it.
      if ($srcLists.length -gt 0) {
         # If we want to keep versions 
         if ($Versions) {
            $result = Export-List -List $srcLists -DestinationFolder "$($ParentFolder)"
         }
         else {
            # Else we don't want to keep versions 
            $result = Export-List -List $srcLists -DestinationFolder "$($ParentFolder)" -NoVersionHistory 
         }
      }

      # If #KeepLists, then keep all lists
      if ($KeepLists) {
         $srcLists = $srcLists | Where-Object { $_.RootFolder -inotmatch "/Lists/" }
      }

      # If !$KeepEmpty, delete the folders which have no content
      if (!$KeepEmpty) {
         foreach ($list in $srcLists) {
            $listPath = "$($ParentFolder)\$($list.Title)"
            $documents = Get-Item -Path "$($listPath)\Documents\*" -ErrorAction Ignore
            if ($documents.length -eq 0) {
               Remove-Item -Path $listPath -Force -Confirm:$false -Recurse
            }
         }
      }

   }
   End {
   }
}
 
 
<#
 .DESCRIPTION
    Gets the subwebs of any web and exports their list contents using ShareGate PowerShell functions
 .EXAMPLE
    Get-SympSubwebs -ParentFolder $parentFolder -WebUrl $webUrl -Versions $versions 
 #>
function Get-SympSubwebs {
   [CmdletBinding()]
   [Alias()]
   [OutputType([int])]
   Param
   (
      # Parent Folder
      [string]
      $ParentFolder,
 
      # Web URL
      [string]
      $WebUrl,
 
      # Versions - Should we download versions (or only the latest version) $true = all versions
      [boolean]
      $Versions,
 
      # ExclusionLists - Array of list names to skip in the download
      [array]
      $ExclusionLists,

      # KeepEmpty - Will create a folder for every library even if it is empty.
      # Setting this to $false will delete the empty folders.
      [boolean]
      $KeepEmpty = $false,

      # KeepLists - Will create a folder for every list even if it is empty.
      # Setting this to $true will keep all lists, regardless of their number of items.
      [boolean]
      $KeepLists = $false

   )
  
   Begin {
  
      Write-Host "Getting subwebs of $($WebUrl)"
 
   }
   Process {
  
      # ShareGate's Connect-Site
      $siteConnection = Connect-Site $WebUrl

      # ShareGate's Get-Subsite
      $webs = Get-Subsite -Site $siteConnection
 
      # Process each web
      foreach ($web in $webs) {
 
         # Remove illegal characters in the web title
         $cleanTitle = $web.Title.Replace("#", "").Replace(":", " - ").Replace("/", "-").Replace("""", "'")

         # Variable for the web's folder - note the leading "_"
         $rootFolder = "$($ParentFolder)\_$($cleanTitle)" 
 
         # Create the web's folder
         $newFolder = New-Item -Path $rootFolder -ItemType Directory -Force

         # Download the lists/libraries with the provided parameters
         Export-SympLists -ParentFolder $rootFolder -WebUrl "$($web.Address)" -Versions $Versions -ExclusionLists $ExclusionLists -KeepEmpty $KeepEmpty -KeepLists $KeepLists

         # Get the web's subwebs - this is the recursion
         Get-SympSubwebs -ParentFolder $rootFolder -WebUrl "$($web.Address)" -Versions $Versions -ExclusionLists $ExclusionLists -KeepEmpty $KeepEmpty -KeepLists $KeepLists

      }
 
   }
   End {
   }
}
 

Here’s an example. Let’s say I set the variables in downloadSite.ps1 like so:

# Setup
$sourceSiteName = "Brazil"
$sourceSiteUrl = "https://myTenant/Brazil/"

# The downloads will end up in a folder here named $sourceSiteName
$destTop = "Z:\"

I end up with something like the following set of folders. Brazil is the top-level site, and it has 3 subsites: Facilities, Human Resources, and Recruitment. Notice that each subsite’s folder’s name starts with an underscore so we can easily understand the tree at a glance.

Within each subsite’s folder, all the lists and libraries within it (if requested) are represented as folders.

Each library’s folder contains the Excel file with the metadata, and a subfolder containing the documents themselves.

Each list’s folder contains the Excel file with the metadata, and a subfolder containing the attachments, if any.

This script gives me a good scaffolding and some options I can use to get content out of SharePoint in an organized and broad way. I’ve already used it with two clients, and I firmly expect I’ll use it again.

How to use Test-Path cmdlet in PowerShell

When working with files or folders in PowerShell, it’s important to test if the path exists, before you try to read or save contents. This is where the Test-Path cmdlet comes in. It checks if all elements of a path exist and returns $true or ... Read moreHow to use Test-Path cmdlet in PowerShell

The post How to use Test-Path cmdlet in PowerShell appeared first on LazyAdmin.

How to use PowerShell Get-Content to Read a File

The Get-Content cmdlet can be used to retrieve the contents from a file in PowerShell. It will retrieve the contents one line at a time, storing them in an array. This allows you to use or process each line in your PowerShell script. Get-Content comes ... Read moreHow to use PowerShell Get-Content to Read a File

The post How to use PowerShell Get-Content to Read a File appeared first on LazyAdmin.

Blog Post: [Microsoft Teams] Module powershell Microsoft Teams disponible en version 4.9.3

Microsoft a rendu disponible aujourd'hui une nouvelle version du module powershell pour Microsoft Teams en version 4.9.3 Date: 31 Janvier 2023 Release notes: https://docs.microsoft.com/fr-fr/MicrosoftTeams/teams-powershell-release-notes Lien: https://www.powershellgallery.com/packages/MicrosoftTeams/4.9.3 Release Notes: **4.9.3-GA** (The project - MicrosoftTeams contains changes till this release) - Adds Certificate parameter to Connect-MicrosoftTeams. - Adds WelcomeTextToSpeechPrompt parameter to [New|Set]-CsCallQueue. - Fixes issues with pipeline input for Test-CsEffectiveTenantDialPlan & Test-CsVoiceNormalizationRule cmdlets. - Releases [Get|Set]-CsOnlineVoicemailValidationConfiguration cmdlets. - Releases [Get|Set|Grant|Remove|New]-CsTeamsMeetingBrandingPolicy cmdlets. - In CsTeamsMeetingBrandingPolicy cmdlets, there is a known issue that prevents using the 'Remove' list modifier when trying to delete a TeamsMeetingBrandingTheme or a NdiAssuranceSlate. To remove all elements from MeetingBrandingThemes, the workaround is setting the values to null, example: Set-CsTeamsMeetingBrandingPolicy -Identity -MeetingBrandingThemes $null -DefaultTheme "". To update the MeetingBrandingThemes, use the [Set]-CsTeamsMeetingBrandingPolicy cmdlet and pass the list of desired MeetingBrandingThemes created with the [New]-CsTeamsMeetingBrandingTheme cmdlet. Example: $exampleMeetingBrandingTheme = New-CsTeamsMeetingBrandingTheme -DisplayName "exampleTheme" -LogoImageLightUri " https://contoso.com/light.jpg " -LogoImageDarkUri " https://contoso.com/dark.jpg " -BackgroundImageLightUri " https://contoso.com/backgroundlight.jpg " -BackgroundImageDarkUri " https://contoso.com/backgrounddark.jpg " -BrandAccentColor "#000000" -Enabled $true -Identity "exampleTheme" And then set the themes using the Set cmdlet: Set-CsTeamsMeetingBrandingPolicy -Identity -MeetingBrandingThemes @($exampleMeetingBrandingTheme) -DefaultTheme "exampleTheme" Use the same approach for removing elements from NdiAssuranceSlate, using the [New]-CsTeamsNdiAssuranceSlate cmdlet and then using Set-CsTeamsMeetingBrandingPolicy to properly set the values. This will be fixed in the next TPM version. - Releases [New]-CsTeamsMeetingBackgroundImage cmdlet. - Releases [New]-CsTeamsMeetingBrandingTheme cmdlet. - Releases [New]-CsTeamsNdiAssuranceSlate cmdlet. - Contains a new implementation of [New|Get|Set|Remove]-CsTeamsCallHoldPolicy, [New|Get|Set|Remove]-CsTeamsEmergencyCallingPolicy, [New]-CsTeamsEmergencyCallingExtendedNotification. Functionality remains the same as previous implementation. Comment installer ou mettre à jour votre module powershell Microsoft Teams Install-Module -Name MicrosoftTeams Si vous avez déja le module, vous pouvez mettre à niveau avec la commande: Update-Module MicrosoftTeams Get-InstalledModule

How to Archive SharePoint Online?

SharePoint Online is a great tool to store and share files, collaborate on projects, and communicate with team members. However, as the amount of data stored in SharePoint Online grows, you will probably run out of storage space. You can buy additional storage in SharePoint ... Read moreHow to Archive SharePoint Online?

The post How to Archive SharePoint Online? appeared first on LazyAdmin.

❌
❌