Windows PowerShell 5.1 Deprecation

Applies To
Windows 11 Home and Pro, version 24H2 Windows 11 Home and Pro, version 25H2 Windows 11 Home and Pro, version 26H2

Original publish date: November 17, 2026
KB ID: 5137172

Summary

Windows PowerShell 5.1 is deprecated. It's no longer in active development. Windows PowerShell 5.1 is still part of Windows, and it's still supported. It will continue to receive security updates according to the lifecycle of each version of Windows. Scripts and tools that rely on it will continue to run.

Windows PowerShell 5.1 will be removed from a future version of Windows. Timing will be based on usage data and communicated in advance.

Microsoft recommends upgrading to PowerShell 7, the upgrade from Windows PowerShell 5.1. For more information, see Migrating from Windows PowerShell 5.1 to PowerShell 7.

Timeline

  • 2026: Windows PowerShell 5.1 is deprecated. Windows Server 2025 and Windows 11, version 26H2 are the last versions of Windows to include PowerShell 5.1 enabled by default.
  • Next Version of Windows: Windows PowerShell 5.1 will be available as a Feature on Demand (FOD), enabled by default on new Windows installs.
  • Future Version of Windows: Not available.

Important

We'll update this article as more information becomes available.

Take action

If you use Windows PowerShell 5.1 for administration or automation, we recommend that you start planning now.

  • Find what uses Windows PowerShell 5.1. Look for scripts, scheduled tasks, installers, management agents, and tools that start powershell.exe or load Windows PowerShell modules.
  • Plan your move to PowerShell 7. Use PowerShell 7 for new automation.
  • Keep Windows PowerShell 5.1 where you still need it. Some modules and tools work only in Windows PowerShell 5.1.

Frequently asked questions

What does deprecation mean for Windows PowerShell 5.1? Windows PowerShell 5.1 is no longer in active development, and it won't get new features. It's still part of Windows, and it's still supported.

Do I need to change anything now? No change is required right now. Scripts and tools that rely on Windows PowerShell 5.1 can continue to run. We recommend that you start planning your move to PowerShell 7.

Will Windows PowerShell 5.1 still get security updates? Yes. It will continue to receive security updates according to the Windows lifecycle. Support for Windows PowerShell is tied to the version of Windows you use. For more information, see PowerShell support lifecycle.

How can I tell whether a script or tool uses Windows PowerShell 5.1?

Check how it's launched:

  • powershell.exe runs Windows PowerShell 5.1.
  • pwsh.exe runs PowerShell 7 or later.

To confirm from inside the script, run:$PSVersionTable.PSEdition

  • Desktop means Windows PowerShell 5.1.
  • Core means PowerShell 7 or later.

The script may also declare its version at the top, for example, #Requires -Version 5.1 or #Requires -PSEdition Desktop.

Additional resources