Finding PowerShell 5.0
- Written by June Blender
- Last Updated: 13 April 2016
- Created: 26 February 2016
- Hits: 1518
Updates: We have updated this article to reflect these changes.
- Windows Management Framework 5.0 RTM, which includes Windows PowerShell 5.0 for systems earlier than Windows 10, is now released.
- Windows Management Framework 5.0 is now available in the Microsoft Update Catalog.
There are some amazing new features of Windows PowerShell 5.0. Some of them, including PowerShellGet, are available in Windows PowerShell 3.0 and 4.0. But, many very useful features, including the new advanced features of DSC, PowerShell classes, the information stream, remote debugging, copying between sessions, and advanced logging are supported only in 5.0.
Unlike previous releases, Windows PowerShell 5.0 will have supported releases, but will not be final. It will be updated with Windows.
All SAPIEN software products fully support Windows PowerShell 5.0 and the new modules, like Pester and PSScriptAnalyzer.
So, how do you find and install PowerShell 5.0?
On Windows 10
Windows PowerShell 5.0 is installed with Windows 10. And, it’s updated automatically when Windows Update updates Windows 10.
Notice that Windows PowerShell now has non-negative values for the Build and Revision properties in its version number.
The full version is useful for comparing versions, although not all versions are different from each other. On the downside, the #Requires -Version statement looks only at the Major and Minor property values, so you need to use an IF statement, or something similar, require a particular version.
In this example, #Requires -Version does not stop the script from running.
On older Windows
If you’re running an older version of Windows, you can install Windows PowerShell 5.0. After being recalled, this RTM version was re-released on February 24, 2016. It’s available in Windows Management Framework (WMF) 5.0 on the Microsoft Download Center and in the Microsoft Update Catalog for large deployments using WSUS or SSCM. It’s also available as a Windows update, KB3066439.
WMF 5.0 supports the following systems:
- Windows Server 2012 R2
- Windows Server 2012
- Windows Server 2008 R2 SP1
- Windows 8.1
- Windows 8.1
- Windows 7 SP1
To install it:
- Uninstall any Windows PowerShell 5.0 previews on the machine (KB3094174, KB3094175, KB3094176). To detect them, use Get-HotFix.
- Install Microsoft .NET Framework 4.5. To get the installed versions, use a script that checks the registry, such as Get-DotNetVersion.ps1.
- Install Windows Management Framework 5.0. (Be sure to read the cautions on this page, too, including incompatible versions of commonly used programs.)
In the Microsoft Update Catalog, search for the version designed for your system. (Searching for “Windows Management Framework,” “Windows PowerShell,” or “PowerShell” doesn’t return these updates. You need to have the magic KB numbers.)
- KB3134758 for Windows Server 2012 R2 and Windows 8.1
- KB3134759 for Windows Server 2012
- KB3134760 for Windows Server 2008 R2 SP1 and Windows 7 SP1
If you installed the WMF 5.0 release version while it was posted on the Download Center and you were affected by the PSModulePath bug, there’s hope for you, too. The PowerShell Team is expected to release a fix to restore your PSModulePath.