Command to find specific patch is installed or not

I wanted to check if  KB KB2998527 is installed in few of my servers.

Powershell on local computer:
get-hotfix -id KB2998527

PowerShell command to look in remote server:
get-hotfix -id KB2998527 -ComputerName myservername

If you have a list of computer names, you can pass it to a command to check multiple machines. For example:
get-content computers.txt | foreach \{ if (!(get-hotfix -id KB974332 -computername $_)) \{ add-content $_ -path Missing-KB974332.txt \}\}

WMI:
wmic qfe get hotfixid | find "KB2998527"

wmic qfe | find "KB2998527"

To get detailed report:
wmic qfe list full /format:htable >C:\Temp\hotfixes.htm

Comments

Popular posts from this blog

vRA/vRO workflows

How to generate HPS Report for Windows