Compare Installed Windows Security Patches with other Servers

By | June 28, 2015

How to compare Installed Windows Security Patches with different Servers: If you are troubleshooting Windows server 2003, 2008 ans 2012 issues and you may have a working server and not working server, want to check is any patches are missing compared to working server? Use the below PowerShell command to compare installed patches between two servers

Normally we use to compare manually and it’s time consuming and painful procedure, you many end up with human errors and may not verify correctly, by doing below automated procedure will save time and effort and get very accurate result which helps to isolate issue while troubleshooting server issues

Also see: One line commands which helps to resolve the issues

Compare Installed Windows Security Patches between two servers with powershell command

$server01 = Read-Host “Computer01”

$server02 = Read-Host “Computer02”

$server01Patches = get-hotfix -computer $server01 | Where-Object {$_.HotFixID -ne “File 1”}

$server02Patches = get-hotfix -computer $server02 | Where-Object {$_.HotFixID -ne “File 1”}

Compare-Object ($server01Patches) ($server02Patches) -Property HotFixID

You can also user -Property sideindicator for -Property HotFixID to get the output in Sideindicator

Computer01 and Computer02 are server names you want to compare the patches

Output will list the difference between two servers on installed patches

Also See: How to extract bulk object from AD with the specific attributes


Leave a Reply

Your email address will not be published. Required fields are marked *