Microsoft officially removes PowerShell 2.0 on Windows 11
Microsoft has completely removed PowerShell 2.0 from preview builds of Windows 11, and the change will roll out to all users "in an upcoming update." Most users probably won't notice PowerShell 2.0's disappearance, but changes like this on Windows are rare.
PowerShell is the primary command-line shell for Windows, designed to overcome the limitations of the Command Prompt that have existed since the days of MS-DOS. PowerShell 2.0 was released in 2009. Despite several major updates since then, some scripts and applications still require the 2.0 shell to function properly. The reduced security restrictions of PowerShell in recent years have made it an ideal conduit for malware, similar to how VBA scripts/macros in Microsoft Office have been exploited.
Microsoft officially deprecated PowerShell 2.0 back in 2017, so its complete demise has been a long time coming. The company said at the time that some of its own applications still use PowerShell 2.0, including versions of SQL Server and Exchange. Most scripts and applications today should have PowerShell 5.0 or later as a baseline requirement, but there may still be a few that haven't been updated.
Windows 11 Insider Preview build 27891 has just been released to the Canary Channel, and it completely removes support for PowerShell 2.0. There are no new details yet, but Microsoft says "more information will be shared in the coming months about the removal of Windows PowerShell 2.0 in an upcoming update to Windows 11."
Overall, the deprecation of PowerShell 2.0 will affect very few people. If you're a longtime PowerShell user, you may need to update some of your scripts. Some older applications may also be using PowerShell 2.0 for some functionality, and if one of them stops working, you'll need to check with the developer or publisher to see if an update is available.
If you still have some scripts running in 2.0 mode using one of the following commands, you will need to remove them and fix any errors that occur with the default version of PowerShell:
powershell.exe -version 2
powershell -v 2
#requires -version 2
In short, the death of PowerShell 2.0 won't affect most people, and it fixes some long-standing security holes in Windows.
You should read it
- Next time, Microsoft will release PowerShell updates via Windows Update Windows
- How to Install or Update PowerShell on Windows 11
- Use PowerShell to download any file on Windows 10
- What is Windows PowerShell? How to use Windows PowerShell
- Instructions on how to use PowerShell in Windows Server 2012
- PowerShell command in Windows