Sep 20, 2026

Microsoft Graph PowerShell SDK V3 Drops Windows PowerShell 5.1 Support: Migration Guide

5 min readAdvanced

Microsoft announced a 12-month retirement period for Windows PowerShell 5.1 support in the Microsoft Graph PowerShell SDK. Version 3 of the SDK, targeted for release in Q4 2026, will run exclusively on PowerShell 7 and will not support Windows PowerShell 5.1 at all. If your Entra ID, Microsoft 365, or Exchange Online automation still runs on Windows PowerShell 5.1, this is worth planning for now rather than discovering it when a script suddenly stops working after an unplanned SDK update.

Scripts on Windows PowerShell 5.1? Graph SDK V3 drops it.

What was actually announced

Microsoft’s announcement establishes a clear split going forward: organizations that need to keep running Windows PowerShell 5.1 must remain on the current V2 release line of the Graph PowerShell SDK, since V3 will not support that runtime at all. Microsoft has stated that V2 will continue functioning on Windows PowerShell 5.1 throughout the 12-month retirement period, so nothing breaks immediately. Version 2.40, the most recent V2 release, is available now through the PowerShell Gallery.

The practical distinction to understand: this is not Microsoft removing Windows PowerShell 5.1 support from an existing product you’re currently running, your existing V2-based scripts keep working. It’s Microsoft drawing a hard line for all future development, meaning any new SDK feature, bug fix priority, or capability added going forward lands in V3 first, on PowerShell 7 only, while V2 on Windows PowerShell 5.1 becomes a maintenance-only branch with a defined end date.

Why Microsoft is doing this

Windows PowerShell 5.1 is the version built into Windows itself, has not received new language features in years, and is not under active development the way PowerShell 7 (the open-source, cross-platform successor) is. Concentrating Graph SDK development on PowerShell 7 lets Microsoft build against a modern, actively developed runtime instead of continuing to support two divergent PowerShell codebases indefinitely. This mirrors a broader pattern across Microsoft’s own tooling: new capabilities increasingly assume PowerShell 7, and Windows PowerShell 5.1 compatibility is treated as a legacy accommodation rather than a first-class target.

Checking what you’re actually running today

# Check which PowerShell version is currently active in your session
$PSVersionTable.PSVersion

# Check which Graph SDK modules are installed and their versions
Get-InstalledModule -Name Microsoft.Graph* | Select-Object Name, Version

# Confirm whether PowerShell 7 is even installed on the machine
Get-Command pwsh -ErrorAction SilentlyContinue

If Get-Command pwsh returns nothing, PowerShell 7 is not installed on that machine at all, which is worth knowing before you assume your scheduled tasks or automation could simply switch to it without any setup.

Planning the migration

  1. Inventory scripts and scheduled tasks that call Graph SDK cmdlets, noting which shell each one currently runs under. A script scheduled via Windows Task Scheduler that doesn’t explicitly specify pwsh.exe as the executable is very likely running under Windows PowerShell 5.1 by default.
  2. Install PowerShell 7 alongside Windows PowerShell 5.1 rather than replacing it, both can coexist on the same machine without conflict:
    winget install --id Microsoft.PowerShell --source winget
  3. Test existing Graph SDK scripts under PowerShell 7 before migrating anything in production. Most well-written scripts using standard Graph cmdlets should run without modification, but anything relying on Windows PowerShell-specific behavior (certain COM object interactions, some .NET Framework-specific assumptions) needs actual testing, not just an assumption of compatibility.
  4. Update scheduled tasks to explicitly invoke pwsh.exe rather than the default powershell.exe once testing confirms a script works correctly under PowerShell 7.

Frequently asked questions

Will my current Graph SDK scripts stop working immediately?
No. Microsoft has stated V2 continues working on Windows PowerShell 5.1 throughout the announced 12-month retirement period, and V2.40 is available now specifically for that continued use. Nothing breaks today, the retirement period exists specifically to give you time to migrate rather than forcing an immediate cutover.

Do I need to migrate to PowerShell 7 even if I don’t plan to use Graph SDK V3 features?
Eventually, yes, if you want to stay on a supported, actively maintained path. Staying on V2 and Windows PowerShell 5.1 indefinitely is a real option during the retirement window, but past that window, you would be running an SDK version no longer receiving updates on a PowerShell runtime Microsoft itself is not prioritizing for new development. Treat the 12-month window as the time to plan the migration properly, not as a permanent option.

Is PowerShell 7 a drop-in replacement for Windows PowerShell 5.1, or are there real behavioral differences?
For most day-to-day Graph SDK usage, compatibility is strong, but PowerShell 7 is built on .NET (Core), not the .NET Framework Windows PowerShell 5.1 uses, which means some Windows-specific modules and COM-based automation that Windows PowerShell 5.1 handles natively may not work identically. Test your actual scripts rather than assuming full compatibility based on general reputation alone.