PowerShell

Connect-MgGraph - Disable WAM Members

⚠️Update July 30, 2026: A project has been made to fix Connect-MgGraph: https://github.com/ugurkocde/MgGraphCommunity ---- Be careful: starting with version 2.34.0, WAM becomes the default and can no longer be disabled. This article is intended for versions below 2.34.0 only. Some blogs mention

Bastien Perez
Bastien Perez
Microsoft 365

Connect-MgGraph - Désactiver WAM Members

⚠️Update 30 juillet 2026 : un projet propose une correction pour Connect-MgGraph : https://github.com/ugurkocde/MgGraphCommunity --- Attention : à partir de la version 2.34.0, WAM devient l'option par défaut et ne peut plus être désactivé. Cet article concerne donc uniquement les versions antérieures à la version

Bastien Perez
Bastien Perez
Microsoft 365

Powershell - Convention de nommage Members

💡Cet article est extrait de mon cahier de vacances PowerShell été 2025 que je publie tout l’été sur mes réseaux sociaux (Linkedin et X/Twitter). À la rentrée, je compilerai chaque jour en un unique PDF. Pour être informé de la sortie ce PDF, tu peux te préinscrire dès

Bastien Perez
Bastien Perez
PowerShell

PowerShell Copilot Assistant with Best Practices-The AI Advantage Members

In the world where AI is omnipresent, I've always believed that while "artificial intelligence" is powerful, it cannot replace the intuition and expertise of a good developer. However, AI can be a valuable tool, especially for beginners looking to build their skills and for experts aiming

Bastien Perez
Bastien Perez
PowerShell

How to get Microsoft Technet Gallery scripts Members

Microsoft closed Technet Gallery and Script Center in early 2021. On this page, you will find a selection of scripts. Please note, however, that the licenses for some scripts do not permit free distribution. If you are seeking any specific script from Technet, feel free to contact me – I have

Bastien Perez
Bastien Perez
PowerShell

Mettre à jour tous les modules PowerShell en une fois Members

Si, comme moi, vous téléchargez des modules sur PowerShell Gallery, vous devez souvent mettre à jour le module avec Update-Module. Je n’aime pas mettre à jour mes modules un par un, et même si je le fais en masse avec Get-InstalledModule | Update-Module je n’ai aucune

Bastien Perez
Bastien Perez
PowerShell

Update all PowerShell modules at once Members

If you download modules from PowerShell Gallery, you often need to update the module with Update-Module to be up-to-date. I don’t like to update one by one, and even if I do in bulk with Get-InstalledModule | Update-Module I miss information about: * the current module

Bastien Perez
Bastien Perez
PowerShell

Invoke-WebRequest and Invoke-RestMethod failed with SSL/TLS Members

When running the Invoke-WebRequestor Invoke-RestMethod command, you may encounter this error: The request was aborted: Could not create SSL/TLS secure channel. At line:1 char:1 + Invoke-WebRequest https://xxxxx … >+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebReques

Bastien Perez
Bastien Perez
PowerShell

Tester authentification AD avec PowerShell Members

Tester un mot de passe Il est parfois nécessaire de tester des identifiants Active Directory afin de valider la conformité du login ou du mot de passe. Par exemple suite à la création en masse d’utilisateurs. Les actions les plus souvent utilisées pour tester sont la connexion à un

Bastien Perez
Bastien Perez
Active Directory

Test AD authentication with PowerShell Members

Test password Sometimes, it is useful to test Active Directory credentials to validate the login or the password. For example, following the bulk creation of users. The most commonly used actions is connecting to a remote desktop (RDP) or connecting to a webmail. However, either the number of login to

Bastien Perez
Bastien Perez
Active Directory

Powershell - Test if AD object exists Members

Be careful about the AD module When building PowerShell scripting with Active Directory, it is often useful to check if an AD object (user, computer, group) is present or not. First, you need to install PowerShell AD Module. On the latest versions of PowerShell shipped with Windows Server 2016 and

Bastien Perez
Bastien Perez
Active Directory

Install PowerShell Active Directory module Members

To run PowerShell command for Active Directory (Get-ADUser, Get-ADComputer, Get-ADGroup, New-ADUser, etc.), the PowerShell module must be on the computer (workstation or server). There are two methods: 1. with the Active Directory PowerShell module installation. It depends on your Windows version 2. with module import via

Bastien Perez
Bastien Perez
Active Directory