Deploy Windows Management Framework 5.1 with SCCM

How to 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.

if (($PSVersionTable.PSVersion | Select-Object -ExpandProperty Major) -eq 5 -and ($PSVersionTable.PSVersion | Select-Object -ExpandProperty Minor) -eq 1)
{
    Write-Host "Installed"
}

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)
{
    Write-Host "Installed"
}

 

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.

Anders Rødland

Anders Rødland started his IT career in 2006. My main focus is MS Configuration Manager and client management, and I have passed 17 Microsoft certifications since then. My main expertise is on client management with Microsoft Endpoint Manager: Intune and Configuration Manager. I also do a lot of work on the security side with Microsoft Defender for Endpoint. In addition to my Microsoft certification, I also have an ITIL v3 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.

4 thoughts to “How to Deploy Windows Management Framework 5.1 with SCCM”

  1. Hey thanks for posting this, i know it’s an old thread but just wanted to know if there’s a particular reason you didn’t use the registry as the detection method

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.