Created
July 15, 2016 21:01
-
-
Save joeypiccola/ce31eacdd605a8b9b94929c10794d609 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# 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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is for when you do that bad thing.