Skip to content

Instantly share code, notes, and snippets.

@vniklas
Created April 19, 2016 21:15
Show Gist options
  • Select an option

  • Save vniklas/5527b52d66bd9fb7ee76da5b5af2c271 to your computer and use it in GitHub Desktop.

Select an option

Save vniklas/5527b52d66bd9fb7ee76da5b5af2c271 to your computer and use it in GitHub Desktop.
Chef Cookbook recipe for adding WMF 5 to a win2012r2 server
#
# Cookbook Name:: demo_dsc
# Recipe:: wmf5install
#
# Copyright (c) 2016 vNiklas, All Rights Reserved.
#lets rocknroll
powershell_script 'updatewmfto5' do
code <<-EOH
mkdir 'c:\\tmp'
Start-BitsTransfer -Source 'http://download.microsoft.com/download/2/C/6/2C6E1B4A-EBE5-48A6-B225-2D2058A9CEFB/Win8.1AndW2K12R2-KB3134758-x64.msu' -Destination 'C:\\tmp\\wmf5.msu'
start-process wusa.exe -argument "c:\\tmp\\wmf5.msu /quiet" -wait
EOH
not_if '(get-host | where version -eq "4.0") -eq $null'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment