Created
October 2, 2016 07:07
-
-
Save marufeuille/a8eb62e9f06d1887b1d7350702f7a3fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$zippath = "c:\PSWindowsUpdate.zip" | |
Invoke-WebRequest "https://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc/file/41459/43/PSWindowsUpdate.zip" -Outfile $zippath | |
$zipfile = (new-object -com shell.application).Namespace($zippath) | |
$destinationPath = "$env:WINDIR\System32\WindowsPowerShell\v1.0\Modules" | |
$destination = (new-object -com shell.application).Namespace($destinationPath) | |
$destination.CopyHere($zipfile.Items()) | |
Import-Module PSWindowsUpdate | |
Get-WUInstall -AcceptAll -IgnoreReboot -AutoSelectOn -Confirm | |
Remove-Item $zippath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment