Powershell, Scripting

Get-Hotfix–Retrieve hotfix information using Powershell

Recently I wanted to verify that I had a certain hotfix installed on my server. I thought i could see if there was a nice and easy way in Powershell to do this and there was. The cmdlet get-hotfix will retrieve the information you need.

PS C:\Users\Administrator> Get-HotFix

Source        Description      HotFixID      InstalledBy          InstalledOn
——        ———–      ——–      ———–          ———–
2008R2        Update           KB981391      2008R2\Neil
2008R2        Update           KB981392      2008R2\Neil
2008R2        Update           KB977236      2008R2\Neil
2008R2        Update           KB981111      2008R2\Neil
2008R2        Update           KB977238      2008R2\Neil
2008R2        Update           982861        2008R2\Neil
2008R2        Update           KB977239      2008R2\Neil
2008R2        Update           KB981390      2008R2\Neil
2008R2        Hotfix           KB2259539     2008R2\Neil
2008R2        Hotfix           KB2286198     NT AUTHORITY\SYSTEM  08/03/2010 00:00:00
2008R2        Security Update  KB2393802     NT AUTHORITY\SYSTEM
2008R2        Security Update  KB2425227     NT AUTHORITY\SYSTEM
2008R2        Security Update  KB2479628     NT AUTHORITY\SYSTEM
2008R2        Security Update  KB2479943     NT AUTHORITY\SYSTEM  03/10/2011 00:00:00
2008R2        Update           KB2484033     NT AUTHORITY\SYSTEM
2008R2        Security Update  KB2485376     NT AUTHORITY\SYSTEM
2008R2        Update           KB2505438     NT AUTHORITY\SYSTEM  03/10/2011 00:00:00
2008R2        Security Update  KB2524375     NT AUTHORITY\SYSTEM
2008R2        Update           KB958488      2008R2\Neil
2008R2        Update           KB976902      2008R2\Neil
2008R2        Service Pack     KB976932      2008R2\Neil

You can also run this against remote computers by adding –computername

Leave a Reply

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