Skip to content

Instantly share code, notes, and snippets.

@joeypiccola
Created July 15, 2016 21:01
Show Gist options
  • Save joeypiccola/ce31eacdd605a8b9b94929c10794d609 to your computer and use it in GitHub Desktop.
Save joeypiccola/ce31eacdd605a8b9b94929c10794d609 to your computer and use it in GitHub Desktop.
# search system for KB3125574 and remove\reboot it if it exists
$lesigh = Get-WmiObject -Class Win32_QuickFixEngineering | ?{$_.hotfixid -eq 'KB3125574'}
if ($lesigh)
{
$rmString = "cmd.exe /c wusa.exe /uninstall /KB:3125574 /quiet /norestart"
([WMICLASS]"\\$env:computername\ROOT\CIMV2:win32_process").Create($rmString) | out-null
sleep -Seconds 600
Restart-Computer -Force
}
@joeypiccola
Copy link
Author

This is for when you do that bad thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment