HomeNewsletterCommunityMVP FeedToolsArchiveBlogToday's NewsAboutServicesQuick Links Subscribe free
← Back to Blog
Intune Microsoft Graph PowerShellPowerShell 7Windows PowerShell 5.1IntuneEntra IDAzure AutomationPowerShell

Microsoft Graph PowerShell v3 Drops Windows PowerShell 5.1 Support in Q4 2026

IA
Imran Awan
20 September 2026

On September 16, 2026, Microsoft started a 12-month countdown for Windows PowerShell 5.1 support in Microsoft Graph PowerShell — the Microsoft.Graph module family that most Intune and Entra ID automation, from admin workstation one-liners to scheduled tasks and Azure Automation runbooks, is built on. The v2.x modules keep working on Windows PowerShell 5.1 during that window, and they keep receiving security fixes. What stops is everything else: new features, bug fixes, and validation now target PowerShell 7.x only. Then, in Q4 CY2026, Microsoft Graph PowerShell v3 ships — and v3 will not run on Windows PowerShell 5.1 at all.

If you have never separately installed PowerShell 7, the PowerShell you already have is Windows PowerShell 5.1 — the version that ships built into every copy of Windows, launched as powershell.exe. PowerShell 7 (launched as pwsh.exe) is a different product you install on top of it. This post explains exactly what changed, how to tell if you are affected, and how to move your admin workstations, scheduled tasks, Azure Automation runbooks, and Intune-run scripts off Windows PowerShell 5.1 before the clock runs out.

The short version

Microsoft announced on September 16, 2026 that Microsoft Graph PowerShell (the Microsoft.Graph module family) is entering a 12-month retirement period for Windows PowerShell 5.1 support, running to roughly September 2027. During that window the current v2.x modules keep declaring compatibility with Windows PowerShell 5.1 and keep receiving security fixes, but new features and bug fixes target PowerShell 7.x only. In Q4 CY2026, Microsoft Graph PowerShell v3 ships and drops Windows PowerShell 5.1 support entirely — v3 only runs on PowerShell 7.x. Every admin workstation script, scheduled task, Azure Automation runbook, and Intune-run script that calls Connect-MgGraph or any other Graph PowerShell cmdlet under Windows PowerShell 5.1 needs a migration plan now, and that plan needs to land on a PowerShell 7 version that itself has real support runway left — not one that is about to go end-of-support on its own schedule.

The problem: your Graph scripts still work today — that is exactly what makes this risky

Here is the trap. If you run Connect-MgGraph and any other Microsoft.Graph cmdlet on Windows PowerShell 5.1 right now, nothing breaks. The script runs, authenticates, returns data, exits 0. Nothing on your screen tells you a clock started.

Microsoft's own words, from the devblog announcement, are specific about what is happening underneath that calm surface:

Quoted directly from Microsoft's Microsoft 365 Developer Blog — "Investing in a more reliable Microsoft Graph PowerShell experience": "today we're announcing that Windows PowerShell 5.x is entering a 12-month retirement period." During that period, "the v2.x modules will continue to declare compatibility with Windows PowerShell 5.1 and will receive security fixes as required," while "maintenance for PowerShell 5.x compatibility winds down, [and] active development, validation, and investment move to PowerShell 7.x and later." Concretely: "new features, bug fixes, and validation will target PowerShell 7.x, and issues specific to Windows PowerShell 5.x will no longer be actively investigated or fixed."

Then comes the part that turns this from "slower support" into "your automation stops working on a fixed date":

Watch out — this is a hard version wall, not a slowdown. Microsoft's own wording: "In Q4 CY 2026 a new major version of Microsoft Graph PowerShell will be released… V3.x modules will not have explicit support for Windows PowerShell 5.x and are only supported for PowerShell 7.x." Once v3 ships, any script that still imports Microsoft.Graph under Windows PowerShell 5.1 and expects the current cmdlets, parameters, and behavior to keep working past that release is depending on a module family whose next major version will not run on that host at all. If your automation silently updates to whatever the latest published module version is — a common pattern with Install-Module ... -Force in a build step — it can pull v3 straight into a Windows PowerShell 5.1 pipeline and fail outright.

This is not a niche corner of Microsoft 365 administration. If you manage Intune-enrolled devices, Entra ID (the identity service formerly called Azure Active Directory) groups, or Conditional Access policies from PowerShell, you almost certainly have at least one script, scheduled task, or Azure Automation runbook that calls Graph PowerShell. The question this post answers is: which PowerShell host is actually running it, right now, on every machine that matters?

Gotcha — this is not the same story as PowerShell 7.4's own end of support. This site already covers a related but separate deadline in PowerShell 7.4 LTS End of Support: Your "Upgrade" to 7.5 Did Not Buy You Any Time. That post is about PowerShell 7 itself going out of support on November 11, 2026. This post is about a Microsoft module — Graph PowerShell — dropping support for an entire PowerShell host (Windows PowerShell 5.1). The two interact directly: whatever PowerShell 7 version you migrate your Graph scripts to needs to have real support life left in its own right, which is exactly where the next section gets specific.

Why it happens: two different products, one retiring clock

To understand why this matters operationally, you need to be clear on what Windows PowerShell 5.1 and PowerShell 7 actually are, because a lot of admins have never had to distinguish them before.

Windows PowerShell 5.1 is the PowerShell built into every current copy of Windows. It launches as powershell.exe. It is built on the .NET Framework, and it has not received a new major version since 2017 — it exists for backward compatibility and stability, not active feature development. It is what runs when a helpdesk analyst opens "Windows PowerShell" from the Start menu, and it is what most existing enterprise scripts, scheduled tasks, and Intune scripts were written against by default.

PowerShell 7 (and 7.1 through 7.7 and beyond) is a completely different, actively developed product, built on modern .NET. Microsoft's own PowerShell documentation is explicit that this is a deliberate, permanent split, not a version bump:

Quoted directly from Microsoft Learn — "Differences between Windows PowerShell 5.1 and PowerShell 7.x": "The binary name for PowerShell has been changed from powershell(.exe) to pwsh(.exe). This change provides a deterministic way for users to run PowerShell on machines and support side-by-side installations of Windows PowerShell and PowerShell."

In plain terms: powershell.exe and pwsh.exe are two separate executables that install side by side and do not replace each other. Installing PowerShell 7 does not upgrade, remove, or touch Windows PowerShell 5.1 in any way. Both keep running independently on the same machine, forever, unless someone explicitly uninstalls one of them.

That side-by-side design is also why "I already installed Microsoft.Graph" is not a reliable statement on its own. Microsoft's own installation guide for the Graph PowerShell SDK spells this out directly:

Gotcha — the module has to be installed separately in each PowerShell host. Quoted from Microsoft Learn's Install the Microsoft Graph PowerShell SDK page: "Installing the SDK in one version of PowerShell doesn't install it for the other. Run the installation command inside the version of PowerShell you intend to use it in." Windows PowerShell 5.1 and PowerShell 7 each keep their own separate module folders (broadly, Documents\WindowsPowerShell\Modules for Windows PowerShell 5.1 versus Documents\PowerShell\Modules for PowerShell 7, per-user, with matching Program Files equivalents for an all-users install). Running Get-InstalledModule Microsoft.Graph inside PowerShell 7 tells you nothing about whether it is also installed under Windows PowerShell 5.1, and vice versa. This is the exact mechanism behind the classic "it says installed but Connect-MgGraph still fails" ticket — the module was installed in the other host.

Put the two pieces together and the retirement announcement makes complete sense. Microsoft is not degrading a feature inside one product — it is redirecting engineering investment away from an entire, separately-installed legacy host (Windows PowerShell 5.1) toward the actively developed one (PowerShell 7.x), on a published timeline, ending with a major version (v3) that simply does not ship a Windows PowerShell 5.1-compatible build.

Where this hits hardest: automation that runs unattended

A single admin running a Graph PowerShell command interactively will probably notice a failure quickly and adapt. The real exposure is automation nobody is watching: a scheduled task that has run nightly for two years, an Azure Automation runbook that fires on a timer, or an Intune Proactive Remediation that has quietly passed every day since it was deployed. All three commonly default to Windows PowerShell 5.1 unless someone specifically pointed them at pwsh.exe, and all three fail silently from a human perspective — the only signal is a job history nobody checks until something downstream breaks.

How to verify: find every place you are still on Windows PowerShell 5.1

Before fixing anything, find out exactly where you stand. Run these checks on any machine, scheduled task host, or Azure Automation account that touches Graph PowerShell.

Step 1 — Confirm which PowerShell host you are actually in

$PSVersionTable.PSVersion tells you the version of whichever host you typed the command into — it does not tell you anything about the other host. Run it in both, deliberately.

Windows PowerShell (Windows PowerShell 5.1)
$PSVersionTable.PSVersion Major Minor Build Revision ----- ----- ----- -------- 5 1 26100 9168 # Major 5 = Windows PowerShell 5.1, the built-in host
PowerShell 7 (pwsh.exe)
$PSVersionTable.PSVersion Major Minor Patch PreReleaseLabel BuildLabel ----- ----- ----- --------------- ---------- 7 6 5 # Major 7 = PowerShell 7.x, the actively developed host

If you only ever see a Major value of 5 on a given machine, PowerShell 7 is not installed there at all yet, regardless of what any script assumes.

Step 2 — Check whether Microsoft.Graph is installed in each host, separately

Run this inside Windows PowerShell 5.1 first, then run the same command inside PowerShell 7. Do not assume one result applies to both, for the reason explained above.

Run inside EACH host separately
Get-InstalledModule Microsoft.Graph -ErrorAction SilentlyContinue | Select-Object Name, Version Get-Module Microsoft.Graph.Authentication -ListAvailable | Select-Object Name, Version, ModuleBase

Get-Module -ListAvailable is the more reliable of the two here — it lists every version physically present on disk for that host, including versions installed by a different tool than Install-Module. ModuleBase in the output shows you exactly which folder it came from, which is the fastest way to confirm you are looking at a Windows PowerShell 5.1 install versus a PowerShell 7 install.

Step 3 — Audit what actually calls Graph PowerShell unattended

The interactive checks above only tell you about the machine you are sitting at. The real risk is in automation you are not watching. Build a list covering:

The companion script for this post automates the first two checks (host versions and module install locations) on a single machine in one pass. Run it on your admin workstations and any server that hosts Task Scheduler jobs calling Graph PowerShell, before you start migrating anything.

Tip. For scheduled tasks specifically, you do not need to open each task individually. Get-ScheduledTask | Get-ScheduledTaskInfo combined with inspecting each task's Actions.Execute property will surface every task whose action path points at powershell.exe versus pwsh.exe in one pass, across an entire server.

The fix: moving admin workstations, scheduled tasks, Azure Automation, and Intune scripts to PowerShell 7

The fix is the same underlying action everywhere — make sure PowerShell 7 is installed, make sure Microsoft.Graph is installed inside PowerShell 7 specifically, and make sure whatever calls your script invokes pwsh.exe instead of powershell.exe. The mechanics differ by channel, so each one gets its own walkthrough below.

Watch out — pick a PowerShell 7 version with real runway, not just "any 7.x". As covered in this site's PowerShell 7.4 LTS End of Support post, both PowerShell 7.4 (LTS) and PowerShell 7.5 reach end of support on the same day — November 11, 2026 — because they are built on different .NET versions with different, coincidentally-aligned clocks. Only PowerShell 7.6 (LTS) has meaningful runway past that date, supported into November 2028. Migrating a Graph PowerShell script off Windows PowerShell 5.1 and onto a PowerShell 7.4 install in, say, October 2026 solves this post's problem for about six weeks before you are back here solving a second, unrelated end-of-support problem. Target PowerShell 7.6 for anything you are deploying now.

Admin workstations: install PowerShell 7 and install Microsoft.Graph inside it

  1. Install PowerShell 7 using winget, which pulls the current release from the Microsoft-owned winget source:
    PowerShell (Administrator)
    winget install --id Microsoft.PowerShell --source winget
  2. For a silent, scripted install (an Intune Win32 app, an image build step, or a fleet push), add the unattended flags:
    Silent install — Intune Win32 app / build script
    winget install --id Microsoft.PowerShell --exact --silent --accept-package-agreements --accept-source-agreements
  3. Alternatively, use the MSI directly (useful when winget is not available, such as on a locked-down server build), then confirm the install path:
    Command Prompt (Administrator)
    msiexec.exe /i PowerShell-7.6.5-win-x64.msi /quiet /norestart # After install, pwsh.exe lives at: C:\Program Files\PowerShell\7\pwsh.exe
  4. Open PowerShell 7 specifically — not Windows PowerShell — from the Start menu, and install the Graph SDK there, using Microsoft's documented command:
    PowerShell 7 (Administrator)
    Install-Module Microsoft.Graph -Scope AllUsers -Repository PSGallery -Force
  5. Confirm the install landed where you expect, from inside PowerShell 7:
    PowerShell 7
    Get-InstalledModule Microsoft.Graph | Select-Object Name, Version
Tip. If a script still needs to run under Windows PowerShell 5.1 for now because it is not fully migrated, leave the existing v2.x install under Windows PowerShell 5.1 alone — it keeps working and keeps getting security fixes for the 12-month window. There is no need to remove it as part of adding PowerShell 7 alongside it; the two hosts and their module folders do not conflict.

Scheduled tasks: repoint the Action to pwsh.exe

A Windows Scheduled Task's Action does not care which PowerShell it is calling — it just runs whatever program path you give it, with whatever arguments you give it. That means repointing a task is a matter of changing the Action, not the script itself.

  1. Open Task Scheduler (taskschd.msc), locate the task, and open its Properties.
  2. Go to the Actions tab, select the existing action, and select Edit.
  3. Change Program/script from powershell.exe to the full path of pwsh.exe:
    C:\Program Files\PowerShell\7\pwsh.exe
  4. Update Add arguments to the same flags you used before, unchanged — pwsh.exe accepts the same -File, -NoProfile, and -ExecutionPolicy switches as powershell.exe:
    -NoProfile -ExecutionPolicy Bypass -File "C:\Scripts\GraphAudit.ps1"
  5. Select OK, save the task, and trigger it once manually (Run from the task list) to confirm it completes with the expected result before relying on the schedule.
Gotcha. If the task runs as a service account or under "Run whether user is logged on or not," confirm Microsoft.Graph was installed with -Scope AllUsers inside PowerShell 7 (Step 4 above). A per-user install under your own admin account will not be visible to a different account context, and the task will fail with a module-not-found error that looks unrelated to this migration at first glance.

Azure Automation runbooks: change the Runtime Version, not just the code

Azure Automation runs each PowerShell runbook against a specific Runtime Version you select when the runbook is created or edited — it is a setting, not something the runbook's own code controls. Microsoft's own documentation confirms the currently supported values and is explicit that PowerShell 7.1 and 7.2 are no longer supported by the parent PowerShell product, so 7.4 or 7.6 are the only current PowerShell 7 choices — and per the callout above, 7.6 is the one with real runway past November 2026.

  1. Sign in to the Azure portal and open your Automation Account.
  2. Go to Process Automation > Runbooks and open the runbook that calls Graph PowerShell.
  3. If the runbook does not already use the runtime environment experience, create or select a Runtime environment and set its Runtime Version to 7.6.
  4. Under that runtime environment's Modules, import Microsoft.Graph.Authentication (and any other Graph submodules the runbook needs) specifically for that 7.6 runtime environment — a module imported against the 5.1 runtime is not automatically available to a 7.6 runbook, the same separate-module-path principle as on a workstation, just expressed through the portal instead of a file path.
  5. Assign the runbook to that runtime environment, save, and run a manual test execution before trusting the schedule.
Azure Automation — Runbook Runtime Version (illustrative)
Graph-Device-Cleanup-Runbook Runtime Version: 5.1
Graph-License-Report-Runbook Runtime Version: 7.6
Note. Azure Automation supports running PowerShell 5.1 and 7.x runbooks side by side in the same Automation Account and even the same Hybrid Runbook Worker, so you can migrate runbooks one at a time rather than needing a single cutover event. Microsoft's own runbook-types documentation confirms both runtime versions are supported for cloud and hybrid jobs in all regions.

Intune-run scripts: work around the fixed powershell.exe host

This is the one channel where you cannot simply point at pwsh.exe in a setting, because Intune does not currently expose one. Win32 app detection/install/uninstall scripts and Proactive Remediation detection/remediation scripts are all executed by the Intune Management Extension through powershell.exe — Windows PowerShell 5.1 — with no portal toggle to change that host.

Gotcha. There is no supported Intune setting that switches a Win32 app or Proactive Remediation script from powershell.exe to pwsh.exe. If your remediation script needs Graph PowerShell specifically, you have two realistic options: have the Windows PowerShell 5.1 script explicitly re-launch itself under pwsh.exe (only useful if PowerShell 7 is already guaranteed present on the target devices), or avoid the Microsoft.Graph module in this execution context entirely and call the Graph REST API directly with Invoke-RestMethod, which has no PowerShell-host dependency at all and will keep working under Windows PowerShell 5.1 indefinitely.
  1. Sign in to the Intune admin center.
  2. Go to Devices > Scripts and remediations > Proactive remediations (or Apps > Windows > Win32 apps for an app's detection/install scripts).
  3. Open the script that currently imports Microsoft.Graph, and decide which of the two workarounds above fits: re-launch under pwsh.exe only if you have already confirmed (via the audit script in this post) that PowerShell 7 is deployed fleet-wide, otherwise convert the Graph calls to direct Invoke-RestMethod calls against https://graph.microsoft.com.
  4. Test the updated script against a small pilot group before reassigning it to the full device group.
Devices Scripts and remediations Proactive remediations

The companion script: auditing PowerShell hosts and Graph module locations

The script for this post, Get-GraphPowerShellVersionAuditReport.ps1, runs the Step 1 and Step 2 checks from the "How to verify" section above in one pass on a single machine: it detects whether powershell.exe and pwsh.exe are present and their versions, reads the Microsoft.Graph.Authentication module folders directly from disk under both hosts' module paths, and reports a plain risk flag — AT RISK if Graph is installed under Windows PowerShell 5.1 only, TRANSITIONAL if it is installed under both, HEALTHY if it is installed under PowerShell 7, or NOT INSTALLED if neither has it. It is entirely read-only: it never calls Install-Module, Update-Module, Uninstall-Module, or any other state-changing cmdlet, and it never calls Connect-MgGraph or any Graph API — it only inspects local PowerShell host and module inventory.

Run it locally first and confirm the output matches what you already found in Step 1 and Step 2, before rolling it out to other machines.

PowerShell — real captured run
.\Get-GraphPowerShellVersionAuditReport.ps1 Microsoft Graph PowerShell version and module path audit (read-only) Checking local PowerShell hosts and Microsoft.Graph module installs... === Windows PowerShell 5.1 host === Found : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe Version: 5.1.26100.9168 === PowerShell 7.x host (pwsh.exe) === Found : C:\Program Files\PowerShell\7\pwsh.exe Version: 7.6.5 === Microsoft.Graph module - Windows PowerShell 5.1 module paths === No Microsoft.Graph.Authentication install found under Windows PowerShell 5.1 module paths. === Microsoft.Graph module - PowerShell 7 module paths === No Microsoft.Graph.Authentication install found under PowerShell 7 module paths. === Risk assessment === RESULT: NOT INSTALLED Microsoft.Graph was not found under either PowerShell host on this machine. No action needed for this specific risk unless a script you plan to run here will install it later. # Exit code 0

Run with -CsvPath to log one row per machine, so you can build a simple fleet-wide list of which devices still show AT RISK before the v3 cutover.

Proof it worked: what a clean migration looks like

"Proof it worked" here means proof each channel is actually invoking PowerShell 7 with Graph PowerShell installed there — not just that PowerShell 7 exists somewhere on the machine. Check each of these before considering a channel migrated:

If any of those checks come back differently — PowerShell 7 shows a version but Graph PowerShell is missing from it, or a scheduled task's history still shows powershell.exe despite editing the Action — stop and re-check that specific step before assuming the migration is complete. A half-migrated channel (PowerShell 7 installed, but the actual caller still invoking Windows PowerShell 5.1, or vice versa for the module) is easy to create by accident and looks identical to a full migration until the day v3 ships and it stops working.

PowerShell Scripts — Graph PowerShell / PowerShell 5.1 audit

This script is being validated locally before it is pushed to GitHub. Once published, it will be available read-only, no sign-in required, from Imran76Awan/Daily-Tasks. It never calls Install-Module, Update-Module, Connect-MgGraph, or any other state-changing or Graph-authenticating cmdlet — it only inspects local PowerShell host versions and module folders. Validate it in your own environment before relying on its output.

Get-GraphPowerShellVersionAuditReport.ps1 — Read-only audit of Windows PowerShell 5.1 / PowerShell 7 hosts and Microsoft.Graph module locations

References

Microsoft MVP community deep-dives

AuthorPostWhat it adds
Tony Redmond (Microsoft MVP)Microsoft Graph PowerShell SDK Dumps PowerShell V5.1Independent breakdown of the same announcement, including the practical recommendation to move scheduled Graph automation off Windows Task Scheduler and onto Azure Automation for better identity and monitoring controls
Was this post helpful?
React below — no account needed
Share this post
LinkedIn X / Twitter Reddit Bluesky

More from EndpointWeekly

Intune
Deregister an Autopilot Device Out of Order and You Can Orphan…
Windows Autopilot registration is a two-part process, and deregistering a device the…
Intune
You Scoped That Admin to One Scope Tag. They Can Still See Every…
Intune scope tags are an allow-list of what a scoped admin CAN see, not a wall around…
Intune
Your Intune Portal Shows What Was Assigned. This Script Shows…
The Intune admin center reports what a policy was assigned to. It doesn't tell you what…