Migrate PowerShell scripts for 2025 changes - MSOnline to Graph, AzureAD to Graph, WMIC replacement
Migrates PowerShell scripts from deprecated modules to Microsoft Graph and native cmdlets.
/plugin marketplace add JosiahSiegel/claude-plugin-marketplace/plugin install powershell-master@claude-plugin-marketplace<script.ps1 or 'MSOnline'|'AzureAD'|'WMIC'>Migrate scripts affected by 2025 breaking changes:
# OLD: MSOnline
Connect-MsolService
Get-MsolUser -All
Set-MsolUser -UserPrincipalName $upn -DisplayName $name
# NEW: Microsoft Graph PowerShell
Connect-MgGraph -Scopes "User.Read.All", "User.ReadWrite.All"
Get-MgUser -All
Update-MgUser -UserId $userId -DisplayName $name
# OLD: AzureAD
Connect-AzureAD
Get-AzureADUser -All $true
Get-AzureADGroup -ObjectId $groupId
New-AzureADUser -DisplayName $name -UserPrincipalName $upn
# NEW: Microsoft Graph PowerShell
Connect-MgGraph -Scopes "User.Read.All", "Group.Read.All"
Get-MgUser -All
Get-MgGroup -GroupId $groupId
New-MgUser -DisplayName $name -UserPrincipalName $upn -PasswordProfile $pwdProfile
# OLD: WMIC
wmic os get caption
wmic cpu get name
wmic process list brief
wmic product get name,version
# NEW: PowerShell
Get-CimInstance Win32_OperatingSystem | Select-Object Caption
Get-CimInstance Win32_Processor | Select-Object Name
Get-CimInstance Win32_Process | Select-Object Handle, Name, ProcessId
Get-CimInstance Win32_Product | Select-Object Name, Version
# Or for software: Get-Package (faster, doesn't use WMI)
| MSOnline | Graph PowerShell |
|---|---|
Connect-MsolService | Connect-MgGraph |
Get-MsolUser | Get-MgUser |
Set-MsolUser | Update-MgUser |
Get-MsolGroup | Get-MgGroup |
Add-MsolGroupMember | New-MgGroupMember |
| AzureAD | Graph PowerShell |
|---|---|
Connect-AzureAD | Connect-MgGraph |
Get-AzureADUser | Get-MgUser |
New-AzureADUser | New-MgUser |
Get-AzureADGroup | Get-MgGroup |
Get-AzureADApplication | Get-MgApplication |
| WMIC | PowerShell |
|---|---|
wmic os get | Get-CimInstance Win32_OperatingSystem |
wmic cpu get | Get-CimInstance Win32_Processor |
wmic memorychip get | Get-CimInstance Win32_PhysicalMemory |
wmic diskdrive get | Get-CimInstance Win32_DiskDrive |
wmic process | Get-CimInstance Win32_Process |
# Install Microsoft Graph PowerShell SDK
Install-PSResource -Name Microsoft.Graph -Scope CurrentUser
# Or install specific submodules
Install-PSResource -Name Microsoft.Graph.Users
Install-PSResource -Name Microsoft.Graph.Groups
Install-PSResource -Name Microsoft.Graph.Authentication