Skip to content

Instantly share code, notes, and snippets.

@LatinSuD
Last active May 15, 2017 13:51
Show Gist options
  • Save LatinSuD/fadcee90da577d3ffad9202533f1ae71 to your computer and use it in GitHub Desktop.
Save LatinSuD/fadcee90da577d3ffad9202533f1ae71 to your computer and use it in GitHub Desktop.
Script para Powershell para saber si un PC esta actualizado para MS17-010
# Sacado originalmente de: https://www.poweradmin.com/blog/how-to-check-for-ms17-010-and-other-hotfixes/
# KB4012212 - Windows Server 2008 y Win7
# KB4012217 KB4015551 KB4019216 - Windows Server 2012
# KB4012216 KB4015550 KB4019215 - Windows Server 2012 R2
# KB4013429 KB4019472 KB4015217 KB4015438 KB4016635 - Windows Server 2016
# List of all HotFixes containing the patch
$hotfixes = "KB4012212", "KB4012217", "KB4015551", "KB4019216", "KB4012216", "KB4015550", "KB4019215", "KB4013429", "KB4019472", "KB4015217", "KB4015438", "KB4016635"
# Search for the HotFixes
$hotfix = Get-HotFix | Where-Object {$hotfixes -contains $_.HotfixID} | Select-Object -property "HotFixID"
# See if the HotFix was found
if (Get-HotFix | Where-Object {$hotfixes -contains $_.HotfixID}) {
echo "Found HotFix: " + $hotfix.HotFixID
} else {
echo "Didn't Find HotFix"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment