Skip to content

Instantly share code, notes, and snippets.

@ianblenke
Created December 3, 2014 22:26
Show Gist options
  • Save ianblenke/cd6d5c49e7db1e4bc46c to your computer and use it in GitHub Desktop.
Save ianblenke/cd6d5c49e7db1e4bc46c to your computer and use it in GitHub Desktop.
Powershell Install WMF 5.0 Preview
if ((Get-CimInstance -ClassName Win32_OperatingSystem).Version -eq '6.3.9600')
{
if ((Get-Ciminstance -ClassName Win32_Processor).Addresswidth -eq '64')
{
$url = 'http://download.microsoft.com/download/5/5/2/55277C4B-75D1-40FB-B99C-4EAFA249F645/WindowsBlue-KB2894868-x64.msu'
}
else
{
$url = 'http://download.microsoft.com/download/5/5/2/55277C4B-75D1-40FB-B99C-4EAFA249F645/WindowsBlue-KB2894868-x86.msu'
}
$fileName = Split-Path $url -Leaf
$downloadPath = "$env:userprofile\Downloads\$fileName"
$webClient = New-Object System.Net.WebClient
$webClient.DownloadFile($url,$downloadPath)
Invoke-Expression -Command "wusa.exe $downloadPath /quiet /norestart"
}
else
{
Write-Warning -message 'Windows Management Framework 5.0 requires Windows 8.1 or Windows Server 2012 R2'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment