Script to find out if updates are installed on a number of servers

2017-12-08T17:00:09+00:00 April 13th, 2015|Azure, Cloud, Windows|

I had to check some of our servers today for a number of updates so rather than logon to each one individually I created a little PowerShell script.

You will need to create 2 text files, one called computers.txt and one called updates.txt ideally saved in the same folder as the script. The contents of each should be obvious (I hope!).

$computers=Get-Content .computers.txt
$Kbs=Get-Content .updates.txt

ForEach ($computerin$computers) {
add-content“———————— $computer ——————————————————-“-path .hotfixes.txt
ForEach ($Kbin$Kbs) {
if ($Info-eq$null) {
add-content$Kb not installed”-path .hotfixes.txt
else {
add-content$Kb installed $InstalledDate-path .hotfixes.txt

It will give you something along the lines of the below:


Hope it helps!