Powershell--检查群集补丁
Windows Server 2012
$menucolor = [System.ConsoleColor]::gray write-host "╔═══════════════════════════════════════════════════════════════════════════════════════════╗"-ForegroundColor $menucolor write-host "║ Identify missing patches ║"-ForegroundColor $menucolor write-host "║ Jan Kåre Lokna - lokna.no ║"-ForegroundColor $menucolor write-host "║ v 1.2 ║"-ForegroundColor $menucolor write-host "║ Requires elevation: No ║"-ForegroundColor $menucolor write-host "╚═══════════════════════════════════════════════════════════════════════════════════════════╝"-ForegroundColor $menucolor #List your patches here. Updated list of patches at http://support.microsoft.com/kb/2784261 $recommendedPatches = "KB2916993", "KB2929869","KB2913695", "KB2878635", "KB2894464", "KB2838043", "KB2803748", "KB2770917" $missingPatches = @() foreach($_ in $recommendedPatches){ if (!(get-hotfix -id $_)) { $missingPatches += $_ } } $intMissing = $missingPatches.Count $intRecommended = $recommendedpatches.count Write-Host "$env:COMPUTERNAME is missing $intMissing of $intRecommended patches:" $missingPatches
Windows Server 2012 R2
$recommendedPatches = "KB2955164", "KB219355"
Windows Server 2008 R2
$recommendedPatches = "KB2531907", "KB2550886","KB2552040", "KB2494162", "KB2524478", "KB2520235"
浙公网安备 33010602011771号