Quantcast
Channel: Windows PowerShell - SAPIEN Blog
Viewing all articles
Browse latest Browse all 308

Finding PowerShell 5.0

$
0
0

Update: Windows Management Framework 5.0 RTM, which includes Windows PowerShell 5.0 for systems earlier than Windows 10, is now released. We have updated this blog post to reflect the change.


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.

clip_image002

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.

clip_image004

On older Windows

If you’re running an older version of Windows, you can install Windows PowerShell 5.0. It’s available in Windows Management Framework (WMF) 5.0. After being recalled, this RTM version was re-released on February 24, 2016.

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:

  1. Uninstall any Windows PowerShell 5.0 previews on the machine (KB3094174, KB3094175, KB3094176). To detect them, use Get-HotFix.
  2. Install Microsoft .NET Framework 4.5. To get the installed versions, use a script that checks the registry, such as Get-DotNetVersion.ps1.
  3. Install Windows Management Framework 5.0. (Be sure to read the cautions on this page, too, including incompatible versions of commonly used programs.)

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.

 

If you have questions about installing Windows PowerShell 5.0 or running any SAPIEN product with Windows PowerShell, be sure to post on our Windows PowerShell forum or the forum for your product.

 

 
[Google+]   [Facebook]   [LinkedIn]   [StumbleUpon]   [Digg]   [Reddit]   [Google Bookmark]  


Viewing all articles
Browse latest Browse all 308

Trending Articles