PowerShell lifecycle reference
PowerShell Deprecation Tracker
Search legacy PowerShell commands, identify their supported replacements, and review migration notes for Microsoft 365, Microsoft Graph, Exchange Online, Teams and Azure administration.
Migration mappings are references, not automatic script conversions. Parameters, permissions, returned properties and authentication methods can differ.
Deprecated and replaced commands
22 tracked entries · Last reviewed July 11, 2026
| Legacy command | Recommended replacement | Module transition | Status | Migration notes | Source |
|---|---|---|---|---|---|
Connect-MsolService | Connect-MgGraph | MSOnline → Microsoft.Graph | Deprecated module | Authentication model and required scopes differ; review delegated versus app-only access. Reviewed 2026-07-11 | Microsoft Learn ↗ |
Get-MsolUser | Get-MgUser | MSOnline → Microsoft.Graph.Users | Deprecated module | Some MSOnline filters and properties do not have exact one-to-one equivalents. Reviewed 2026-07-11 | Microsoft Learn ↗ |
New-MsolUser | New-MgUser | MSOnline → Microsoft.Graph.Users | Deprecated module | Password profile and usage-location handling use Graph request properties. Reviewed 2026-07-11 | Microsoft Learn ↗ |
Set-MsolUser | Update-MgUser | MSOnline → Microsoft.Graph.Users | Deprecated module | Use the user ID or UPN and Graph-compatible property names. Reviewed 2026-07-11 | Microsoft Learn ↗ |
Remove-MsolUser | Remove-MgUser | MSOnline → Microsoft.Graph.Users | Deprecated module | Deleted-user restore and permanent deletion use separate Graph cmdlets/endpoints. Reviewed 2026-07-11 | Microsoft Learn ↗ |
Connect-AzureAD | Connect-MgGraph | AzureAD → Microsoft.Graph | Deprecated module | Graph permissions/scopes must be requested explicitly. Reviewed 2026-07-11 | Microsoft Learn ↗ |
Get-AzureADUser | Get-MgUser | AzureAD → Microsoft.Graph.Users | Deprecated module | Use -Property to request properties that Graph does not return by default. Reviewed 2026-07-11 | Microsoft Learn ↗ |
New-AzureADUser | New-MgUser | AzureAD → Microsoft.Graph.Users | Deprecated module | Request syntax and object property names differ. Reviewed 2026-07-11 | Microsoft Learn ↗ |
Set-AzureADUser | Update-MgUser | AzureAD → Microsoft.Graph.Users | Deprecated module | Not every AzureAD parameter maps directly to Update-MgUser. Reviewed 2026-07-11 | Microsoft Learn ↗ |
Remove-AzureADUser | Remove-MgUser | AzureAD → Microsoft.Graph.Users | Deprecated module | Confirm object ID/UPN and deletion behavior before migration. Reviewed 2026-07-11 | Microsoft Learn ↗ |
Get-AzureADGroup | Get-MgGroup | AzureAD → Microsoft.Graph.Groups | Deprecated module | Graph filtering may require ConsistencyLevel eventual and CountVariable. Reviewed 2026-07-11 | Microsoft Learn ↗ |
Add-AzureADGroupMember | New-MgGroupMemberByRef | AzureAD → Microsoft.Graph.Groups | Deprecated module | Supply the directory object reference in the Graph request body. Reviewed 2026-07-11 | Microsoft Learn ↗ |
Remove-AzureADGroupMember | Remove-MgGroupMemberByRef | AzureAD → Microsoft.Graph.Groups | Deprecated module | Use group ID and directory-object ID. Reviewed 2026-07-11 | Microsoft Learn ↗ |
Get-AzureADServicePrincipal | Get-MgServicePrincipal | AzureAD → Microsoft.Graph.Applications | Deprecated module | Property names, filters and permissions differ from AzureAD. Reviewed 2026-07-11 | Microsoft Learn ↗ |
Get-MessageTrace | Get-MessageTraceV2 | ExchangeOnlineManagement | Replaced | Use the V2 query limits and date-window requirements. Reviewed 2026-07-11 | Microsoft Learn ↗ |
Get-MessageTraceDetail | Get-MessageTraceDetailV2 | ExchangeOnlineManagement | Replaced | Use with results returned by the V2 message trace workflow. Reviewed 2026-07-11 | Microsoft Learn ↗ |
Login-AzureRmAccount | Connect-AzAccount | AzureRM → Az.Accounts | Retired module family | AzureRM scripts should be migrated to the Az module family. Reviewed 2026-07-11 | Microsoft Learn ↗ |
Get-AzureRmVM | Get-AzVM | AzureRM.Compute → Az.Compute | Retired module family | Most AzureRM cmdlets follow the AzureRm-to-Az naming transition, but test parameters. Reviewed 2026-07-11 | Microsoft Learn ↗ |
New-CsOnlineApplicationEndpoint | New-CsOnlineApplicationInstance | MicrosoftTeams | Deprecated | Application endpoint management moved to application-instance cmdlets. Reviewed 2026-07-11 | Microsoft Learn ↗ |
Get-CsOnlineApplicationEndpoint | Get-CsOnlineApplicationInstance | MicrosoftTeams | Deprecated | Use the supported application-instance cmdlet. Reviewed 2026-07-11 | Microsoft Learn ↗ |
Set-CsOnlineApplicationEndpoint | Set-CsOnlineApplicationInstance / Set-CsPhoneNumberAssignment | MicrosoftTeams | Deprecated | The replacement depends on whether you are changing the application instance or its phone number. Reviewed 2026-07-11 | Microsoft Learn ↗ |
New-CsOnlineSession | Connect-MicrosoftTeams | Legacy SkypeOnlineConnector → MicrosoftTeams | Removed legacy connection | Modern Teams PowerShell establishes the remote session through Connect-MicrosoftTeams. Reviewed 2026-07-11 | Microsoft Learn ↗ |