Export installed hotfixes including install date and installed by to csv file with powershell

Here is a nifty powershell command to read a list of servers contained in a text file called computers.txt and output the installed hotfixes including installed by and install date columns into a csv file.
get-content .\computers.txt | Where {$_ -AND (Test-Connection $_ -Quiet)} | foreach { Get-Hotfix -computername $_ | Select CSName,Description,HotFixID,InstalledBy,InstalledOn } | export-csv c:\serverhotfix.csv

NOTE:-you need to create a file called computers.txt and run the command from the same directory.

Advertisements
This entry was posted in Non SCOM Techy Stuff and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s