Skip to content

Instantly share code, notes, and snippets.

@briangig
Last active May 23, 2017 03:48
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 briangig/7a3807ac38bd4f2f2bb51ef0ea68ccd2 to your computer and use it in GitHub Desktop.
Save briangig/7a3807ac38bd4f2f2bb51ef0ea68ccd2 to your computer and use it in GitHub Desktop.
$hotfixes = "KB4019218", "KB4019474", "KB4019213", "KB4019214", "KB4019263", "KB4015553", "KB4015554", "KB4015552", "KB4015221", "KB4012219", "KB4012220", "KB4012218", "KB4012212", "KB4016637", "KB4012213", "KB4012214", "KB4012215", "KB4012216", "KB4012217", "KB4012598", "KB4012606", "KB4013198", "KB4013389", "KB4013429", "KB4015217", "KB4015219", "KB4015438", "KB4015549", "KB4015550", "KB4015551", "KB4016635", "KB4016636", "KB4019215", "KB4019216", "KB4019264", "KB4019472", "KB4019473", "KB4016871"
$hotfix = Get-HotFix | Where-Object {$hotfixes -contains $_.HotfixID} | Select-Object -property "HotFixID"
if (Get-HotFix | Where-Object {$hotfixes -contains $_.HotfixID})
{
"Found HotFix: " + $hotfix.HotFixID
} else {
"Didn't Find HotFix"
}
$hotfix = Get-HotFix | Where-Object {$hotfixes -contains $_.HotfixID} | Select-Object -property "HotFixID"
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