PowerShell 7 heading into Windows as 5.1 hits the end of the road

Posted

Microsoft has confirmed that, at long last, PowerShell 7 will come bundled with Windows, while the venerable PowerShell 5.1 begins its long retirement.

It has been a long time coming, although PowerShell 5.1 isn't going away immediately. It will, however, "be removed from a future version of Windows," and Windows Server 2025 and Windows 11 26H2 are the last versions to include PowerShell 5.1 enabled by default.

After that, PowerShell 5.1 will be available as a Feature On Demand (FOD) before eventually shuffling off into the sunset, while PowerShell 7 takes over automation duties.

PowerShell 5.1 is now more than ten years old and runs on the .NET Framework. PowerShell 7 is its cross-platform, open source successor, but compatibility isn't seamless.

PowerShell was the brainchild of Jeffrey Snover, who sought to bring script automation to Windows at a time when graphical user interfaces were king. He recalled executives telling him "admins don't want command line interfaces," and "exactly what part of effing Windows is confusing you?" but eventually won the argument, and we reckon countless Windows administrators owe him a debt of gratitude.

PowerShell 5.1 hasn't had many new features for years. "PowerShell 7 is the modern PowerShell: the one we develop in the open, across platforms, and where new features go," wrote Jason Helmick, a senior product manager on Microsoft's PowerShell team. But compatibility niggles remain.

The two can run side by side, so existing scripts won't have to move immediately. Finding and testing everything scattered across an enterprise estate, however, could keep administrators occupied for some time.

Microsoft also has unfinished work on the bundled version's MSIX packaging, including support for running as SYSTEM, DISM cmdlets, and machine-wide settings. Those gaps matter for scheduled tasks, services, and management scripts.

Despite the deprecation, PowerShell 5.1 will continue to receive updates based on the lifecycle of the Windows version on which it runs. It will eventually be removed based on usage data and "communicated in advance," according to Microsoft.

Administrators have time to prepare, but checking which scripts run unchanged, which need work, and which still depend on 5.1 won't happen by itself.

"Including PowerShell 7 in Windows is a milestone we've been working toward since PowerShell went cross-platform," Helmick wrote, although the bundled release is still ahead.

Microsoft says PowerShell 7 will arrive with the next Windows release, but hasn't named it. 27H2, anyone? ®

os platforms