How to Deploy Windows Management Framework 5.1 with SCCM

Deploy Windows Management Framework 5.1 with SCCM

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.

Downloadhttps://www.microsoft.com/en-us/download/details.aspx?id=54616

New Features

  • 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.

Requirements

  • .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.

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

 

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”.

Deploy Windows Management Framework with SCCM - Step 1

 

Name the application “Windows Management Framework 5.1”.

Deploy Windows Management Framework with SCCM - Step 2

 

Create a deployment type and select “Script Installer” as type and select “Manually specify the deployment type of information”.

Deploy Windows Management Framework with SCCM - Step 3

 

Type in a suitable name for the deployment type.

Deploy Windows Management Framework with SCCM - Step 4

 

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.

Deploy Windows Management Framework with SCCM - Step 5

 

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.

Deploy Windows Management Framework with SCCM - Step 6

 

Select PowerShell in script type and enter the detection method.

Deploy Windows Management Framework with SCCM - Step 7

 

Select “Install for system” in installation behavior and “Whether or not a user is logged on” in logon requirement.

Deploy Windows Management Framework with SCCM - Step 8

 

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).

Deploy Windows Management Framrwork 5.1 with SCCM requirements

 

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.

Deploy Windows Management Framework with SCCM - Step 9

 

This is how the deployment type wizard summary looks like on my system.

Deploy Windows Management Framework with SCCM - Step 10

 

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”.

Deploy Windows Management Framework with SCCM - Step 11

 

Windows Management Framework 5.1 application is now ready to deploy. Right click the application, select deploy, and deploy it to your favorite collection.

About the Author

Anders Rodland
Anders Rødland started his carrer as an IT consultant in 2006 and now works as a Senior IT-Specialist and Service Owner for Atea, one of the major IT companies in Scandinavia. My main focus is on Microsoft System Center, and I currently have more than 13 Microsoft certifications. Certified on Windows Server, Windows Client, SQL, Exchange and System Center Configuration Manager. Anders Rodland also holds an ITIL Foundation certification. This is my private blog and do not represent my employer. I use this to share information that I find useful. Sharing is caring.
  • cfreeman21

    Shouldn’t there be a check if WMF 3.0 is installed and if so do a uninstall?

    • There is no need to uninstall WMF 3.0 before upgrading to 5.1. Previous version (5.0) actually required that WMF 4.0 was installed before you could upgrade to 5.0

  • Pingback: Deploy Windows Management Framework 5 with ConfigMgr()