Microsoft releases major PowerShell update after long preview
Windows Management Framework 5.0 now available for Windows Server
Microsoft has released Windows Management Framework (WMF) 5.0, a major update to its PowerShell scripting and automation platform.
WMF 5.0 was first announced in April 2014. Windows architect and PowerShell inventor Jeffrey Snover highlighted features such as OneGet, now also called PackageManagement, which lets you install packages from cloud repositories, and the ability to manage network switches with PowerShell commands.
PowerShellGet lets you install modules from cloud repositories
PowerShell is critical to Microsoft's plans for Windows Server. The company is trying to persuade admins to install Windows Server without a GUI shell at all, where possible, making PowerShell essential. The tool also comes into its own for DevOps, where deployment of both virtual infrastructure and applications is automated.
PackageManagement is based on the Chocolatey project, which aims to bring something like the Linux Aptitude (apt-get) package manager to Windows. It builds on NuGet, which Microsoft designed for bringing code into Visual Studio projects.
Essentially, PackageManagement brings in binary packages into Windows. The default package source is Microsoft's nuget.org, but you can also set up private repositories.
Snover, you could argue, is trying to make Windows more like Linux.
An offshoot of PackageManagement is another new feature, PowerShellGet. This is for installing new PowerShell modules or scripts, and has as its default repository the PowerShell Gallery, with nearly 500 modules. Not all modules are from Microsoft, and there is potential risk from bad scripts.
"Microsoft recommends that you review the contents and code of items on this gallery prior to installation. If you discover an item that you feel is not published in good faith, click Report Abuse on that item's page," says the guidance.
Next up is Just Enough Administration (JEA), which lets you give users the ability to run specified commands, scripts and executables as an administrator, but without assigning them the administrator role. It works using virtual accounts and a locked down "no-language" form of PowerShell to prevent other commands from running.
The PowerShell language has also been updated, with the big new feature being new Class and Enum keywords that make it a full object-oriented language, complete with inheritance support.
Debugging has also been improved, with the ability to break into a running script by pressing Ctrl+Break, and to attach the debugger to any process on the local computer that is running PowerShell. You can also edit scripts in a remote session with the PSEdit command.
There are extensive changes to Desired State Configuration (DSC), a feature which lets you automatically set Windows to a particular configuration (such as which components are installed) by defining that configuration in code. Improvements in DSC benefit automation tools such as Chef and Puppet.
Software Inventory Logging is a set of cmdlets for auditing what software is installed on a server and sending the results to an aggregation server. "None of this data is sent to Microsoft", promises the documentation.
Finally, there a bunch of new cmdlets, including those for ZIP archiving, clipboard, convert-string for string formatting by example rather than struggling with Regular Expressions, temporary file support, viewing data in hexadecimal format, and more.
The long preview of WMF 5.0 means that the above will already be familiar to many admins, but the production-ready stamp is significant.
You can download WMF 5.0 here. There is no download for Windows 10, since it is included in the November 2015 update (Build 10586). ®