An authoritative learning resource to quickly get up to speed with new features and changes in Windows PowerShell is to consult the excellent built-in help system directly. This is provided that Update-Help is executed beforehand. Besides using ?* wildcards against the Get-Help (help or man) or Get-Command cmdlets to discover and learn more about a specific cmdlet set or feature, you should peruse the set of about_* help files to aid in your learning endeavours.
One good place to start is to run
help about_Windows_PowerShell_5.0 -ShowWindow
This help file continues to carry the same name under the production releases of Windows Server 2016, Windows 10 Anniversary Update or systems with WMF 5.1 installed. Interesting enough, it still refers to the former two as “Windows Server Technical Preview and Windows Technical Preview” in the documentation. Not surprisingly, certain inaccurate information remain such as references to a non-existence Compare-DscConfiguration, Test-ModuleManifest (which is already present in PowerShell 4.0) or “A new module, OneGet, lets you discover and install software packages …” (now formally call PackageManagement). Likewise, the provided links such as “What’s New in Windows PowerShell” contains information which are not necessarily updated# (Last Updated: 12/14/2016).
Now you may wonder what this blog post is all about?
Short of picking up tips here and there all over the place, there does not appear to be a good reference stating the new features or changes introduced in 5.x (particularly 5.1) vis-a-vis the last major release. That is to say, most Microsoft Windows PowerShell documentation basically conveniently lump together what’s previously available with new ones (largely without explicitly calling out any differences in the latter vs the former).
In the past, Microsoft helpfully suggested in the local help file system with information like “This cmdlet was introduced in Windows PowerShell 3.0”. Such important statements have pretty much disappeared since PS 4.0. Although lines similar to “This cmdlet was introduced in Windows PowerShell 5.0”, “Windows PowerShell 5.0 introduces …” or “Starting in Windows PowerShell 5.0 …” reappear and are now sprinkled all over the local help system, it is incomplete as the majority of new or changed PowerShell 5.x features are often unclear or never actually documented. Unless an administrator religiously update and pound the help files regularly plus the use of his/her beloved search engine, new or changed items may easily escape him/her.
In upcoming blog posts, I shall attempt to summarize at a high-level the visible changes in core PowerShell aspects touching on functions, aliases, cmdlets, variables and modules. To this end, you can easily solicit Get-Help or your favourite search engine to find out more about these new entities. The reference servers run the RTM releases of Windows Server 2012 R2 (with PowerShell 4.0 out-of-the-box + WMF 5.x) and Windows Server 2016 (PowerShell 5.1). This should provide a good indication of what to expect on Windows client operating systems with comparable PowerShell and WMF versions installed.
So watch this space for the first installment of this series on “HELP: PowerShell 5.1 / 5.0 What’s New (and More)”.
———-
#
”
Windows PowerShell 5.0 is installed by default on Windows Server 2016 and Windows 10. To install Windows PowerShell 5.0 on Windows Server 2012 R2, Windows 8.1 Enterprise, or Windows 8.1 Pro, download and install Windows Management Framework 5.0. Be sure to read the download details, and meet all system requirements, before you install Windows Management Framework 5.0 Preview.
”
BACKGROUND
To recap, Windows Server 2016 and Windows 10 Anniversary Update both come with PowerShell 5.1 out-of-the-box[1]. You can update previous versions of the server and client Windows operating system to PS5.1 by way of the Windows Management Framework 5.1 (KB3191565). For version 5.0 of PowerShell, it was first released in Windows 10 RTM where the WMF 5.0 package for older Windows OS followed shortly. As a reminder, a number of platform specific features are only available on newer OS versions and are not exposed on legacy/down-level systems even with the latest Windows Management Framework applied e.g. *-Disk or *-NetAdapter set of cmdlets on Windows 7 SP1 with WMF 5.1.14393.953.
Starting with Windows PowerShell 3.0, in case you are not aware, you have to manually run Update-Help to download a full local copy of the Help files. This is because PowerShell only ships with skeletal help and primarily for US English systems; other locales were unfortunately excluded. The workaround was to install the help system using the en-us locale for the latter or summon help directly on-line using the web. To realize this, Internet connectivity is a must which is not always possible for secured backend server systems[2]. This issue appears to be addressed after numerous concerned customer feedback sometime late in the PS 4.0 release. Nevertheless, for the best experience on locales other than (US)English, run Update-Help -UICulture en-us -force to download the latest en-us help files to your system.
[1] see “WMF 5.1 Operating System Compatibility” for an overview
[2] run Save-Help on a different computer to save a local copy of help files then execute Update-Help -source on the target machine.
REFERENCES
– Windows PowerShell 5.1 (MSDN)
– Windows PowerShell 5.0 (MSDN)
– PowerShell (WikiPedia)