How to deploy Windows Management Framework 5.1 with SCCM. Microsoft released Windows Management Framework 5.1 in January 2017, and with it comes PowerShell 5.1 that includes new featues and cmdlets. This blog post covers how you can deploy Windows Management Framework 5.1 with SCCM.
- New cmdlets: local users and groups; Get-ComputerInfo.
- PowerShellGet improvements include enforcing signed modules, and installing JEA modules.
- PackageManagement added support for Containers, CBS Setup, EXE-based setup, CAB packages.
- Debugging improvements for DSC and PowerShell classes.
- Security enhancements including enforcement of catalog-signed modules coming from the Pull Server and when using PowerShellGet cmdlets.
- Responses to a number of user requests and issues.
- .Net Framework 4.5.2.
.Net Framework 4.5.2 is a minimum requirement. Windows Management Framework 5.1 will install fine on .Net Framework 4.6.2 as well.
Check out my guide: How to Deploy .NET Framework 4.6.2 with SCCM
Note Windows Management Framework 5.0 required WMF version 4 to be installed before 5.0 could be installed. Microsoft has changed this, and you no longed need to install any previous versions of WMF before you deploy Windows Management Framework 5.1.
Windows Management Framework 3.0 must be uninstalled if present before Windows Management Framework 5.1 can be installed.
Supported operating systems
- Windows 7 SP1
- Windows 8.1
- Windows Server 2008 R2
- Windows Server 2012 R2
Windows 8.1 and Windows Server 2012 R2
- Install: wusa.exe Win8.1AndW2K12R2-KB3191564-x64.msu /quiet /norestart
- Uninstall: wusa.exe /KB:3191564 /uninstall /quiet /norestart
Windows 7 SP1 and Windows Server 2008 R2
- Install: wusa.exe Win7AndW2K8R2-KB3191566-x64.msu /quiet /norestart
- Uninstall: wusa.exe /KB:3191566 /uninstall /quiet /norestart
Powershell Detection method
When Windows Management Framework 5.1 is successfully installed, Powershell will run at major version 5 and minor version 1. So we create a detection method on these specific values.
if (($PSVersionTable.PSVersion | Select-Object -ExpandProperty Major) -eq 5 -and ($PSVersionTable.PSVersion | Select-Object -ExpandProperty Minor) -eq 1)
Note: a Powershell detection method should only return “Installed” if the application is detected, and not return anything if the application was not found.
Uninstall Windows Management Framework 3.0 first
Windows Management Framework 3.0 need to be uninstalled first (only applicable if installed on Windows 7 and Windows Server 2008 R2). Create an application for it with a detection method and an uninstall string, and set Windows Management Framework 5.1 to supersede it. Windows Management Framework 5.1 will then automatically uninstall it if found before it installs version 5.1
Uninstall : wusa.exe /KB:2506143/uninstall /quiet /norestart
Detection method for Windows Management Framework 3.0
if (($PSVersionTable.PSVersion | Select-Object -ExpandProperty Major) -eq 3)
Deploy Windows Management Framework 5.1 with SCCM – Step by step
This is a step-by-step guide shows how to create the application for Windows Management Framework 5.1, and we will create a deployment type that will install the application for both Windows 7 SP1 64-bit and Windows Server 2008 R2. If you want to create a deployment type for Windows 8.1 and Server 2012 R2, simply replace the install and uninstall strings with the ones provided above. The detection method is the same.
Create application and select “Manually specify the application information”.
Name the application “Windows Management Framework 5.1”.
Create a deployment type and select “Script Installer” as type and select “Manually specify the deployment type of information”.
Type in a suitable name for the deployment type.
Select the content location of Windows Management Framework 5.1 on a network share. Use the install and uninstall strings for the respective operating system provide above.
Select “Use a custom script to detect the presence of this deployment type”. We will use a Powershell detection method to detect if Windows Management Framework 5.1 is installed or not.
Select PowerShell in script type and enter the detection method.
Select “Install for system” in installation behavior and “Whether or not a user is logged on” in logon requirement.
We will add a requirement to this deployment type to make sure it will only install on the correct and supported operating system. For this deployment type we select Windows 7 SP1 (64-bit) and All Windows Server 2008 R2 (64-bit).
We want to make sure that all requirements are in place before we attempt to install Windows Management Framework. For dependency, select the .NET Framework 4.6.2 application (minimum version supported is 4.5.2), and set it to automatically install if not present.
This is how the deployment type wizard summary looks like on my system.
The application is created is now created. Note that Windows Management Framework 5.1 requires a restart of the computer in order to finish the installation, but it will not force a restart due to us specifying the /norestart parameter in the installation string. You can change the restart behavior by editing the deployment type under the tab “User Experience”.
Windows Management Framework 5.1 application is now ready to deploy. Right click the application, select deploy, and deploy it to your favorite collection.