Windows Management Framework

A silent installer for Windows Management Framework 5.1, which includes PowerShell v5 and DSC.

<?xml version="1.0" encoding="UTF-8"?>

<packages>

	<package 
		id="microsoft-wmf-5.1"
		name="Microsoft WMF v5.1"
		revision="1"
		priority="90">
		
		<variable name="INSTALLER" value="Win7-KB3191566-x86.msu" architecture="x86" />
		<variable name="INSTALLER" value="Win7AndW2K8R2-KB3191566-x64.msu" architecture="x64" />
		
		<check type="execute" path="powershell.exe -Command &quot;&amp;{ exit $PSVersionTable.PSVersion.Major }&quot;" condition="exitcodegreaterorequal" value="5" />

		<install cmd='wusa.exe "%SOFTWARE%\Microsoft\WMF-5.1\%INSTALLER%" /quiet /norestart' >
		   <exit code="0" />
		   <exit code="3010" reboot="true" />
		   <exit code="-2145124329" />
		</install>
	 
		<upgrade include="install" />
		
		<depends package-id="microsoft-dotnet45" />
		
	</package>

</packages>

Note: This script checks that Powershell v5 is installed, it doesn't not verify the other parts of WMF. Also, this package requires that .NET 4.5 is installed, in this script that is expressed by the dependency on the package named "microsoft-dotnet45".