Have you ever needed to retrieve the hotfixes from a list of machines?
Back in the past, we have several other forms of getting this information now with PowerShell this is simple.

What you have to do is change the first line of the script to point to the path where you save the list of servers “computers.txt”, the output file will be created at the same level the script is saved.
Don’t forget to save the PowerShell script with the right extension.

# Get hotfixes from a list of computers via PowerShell
# Script version 1.0
# Date : 04/01/2016
# Michael Goulart

# Get Hotfixes installed into a list of computers.

function Hotfixreport {
$computers = Get-Content C:\Your.path.here\computers.txt
$ErrorActionPreference = 'Stop'
ForEach ($computer in $computers) {

try
{
Get-HotFix -cn $computer | Select-Object PSComputerName,HotFixID,Description,InstalledBy,InstalledOn | FT -AutoSize

}

catch

{
Write-Warning "System Not reachable:$computer"
}
}

}
Hotfixreport > "$env:USERPROFILE\Desktop\Hotfixreport.txt"

There are also links to my Github and Technet repository.

Technet
https://gallery.technet.microsoft.com/Get-hotfixes-from-a-list-f18e6322?redir=0

GitHub
https://github.com/mgoular/Get-Installed-Hotfixes

Hope you find useful!
Cheers
Michael


0 Comments

Leave a Reply

Avatar placeholder

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