Created
May 22, 2017 14:16
-
-
Save swaters86/be05775edfeb424fd9312717f3c66e34 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
#list of all the hotfixes from https://technet.microsoft.com/en-us/library/security/ms17-010.aspx | |
$hotfixes = "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", "KB4015221", "KB4019474", "KB4015219", "KB4019473" | |
#checks the computer it's run on if any of the listed hotfixes are present | |
$hotfix = Get-HotFix -ComputerName $env:computername | Where-Object {$hotfixes -contains $_.HotfixID} | Select-Object -property "HotFixID" | |
#confirms whether hotfix is found or not | |
if (Get-HotFix | Where-Object {$hotfixes -contains $_.HotfixID}) | |
{ | |
"Found HotFix: " + $hotfix.HotFixID | |
} else { | |
"Didn't Find HotFix" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment