Skip to content

Instantly share code, notes, and snippets.

@tech-zombie
Last active May 17, 2017 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tech-zombie/dd414b20f5dc4ea227a9514af403f1bd to your computer and use it in GitHub Desktop.
Save tech-zombie/dd414b20f5dc4ea227a9514af403f1bd to your computer and use it in GitHub Desktop.
quick dirty wannacry patch checker
$fix = (Get-HotFix | findstr "KB3205409 KB3210720 KB3210721 KB3212646 KB3213986 KB4012212 KB4012213 KB4012214 KB4012215 KB4012216 KB4012217 KB4012218 KB4012220 KB4012598 KB4012606 KB4013198 KB4013389 KB4013429 KB4015217 KB4015438 KB4015546 KB4015547 KB4015548 KB4015549 KB4015550 KB4015551 KB4015552 KB4015553 KB4015554 KB4016635 KB4019213 KB4019214 KB4019215 KB4019216 KB4019263 KB4019264 KB4019472")
if([string]::IsNullOrEmpty($fix))
{Write-Host -ForegroundColor Yellow -backgroundcolor red "************** UNSAFE patch me! ****************"
Write-Host -ForegroundColor yellow -backgroundcolor black "************** UNSAFE patch me! ****************"
Write-Host -ForegroundColor yellow -backgroundcolor red "************** UNSAFE patch me! ****************"} else {write-host -ForegroundColor Green "----------- SAFE :-) ---------------"
$fix}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment