How do I generate a list of windows patches and the date they were installed on a windows 2000 server?
Solution 1:
Option 1
Get psinfo from http://technet.microsoft.com/en-us/sysinternals/bb897550.aspx
Run psinfo -h
to get the list of hotfixes
Option 2
Another method that doesn't require 3rd party software using wmic
; just type:
wmic qfe
from the command line. The default output gives really long lines, so you might be better off redirecting to a file and viewing it in your favourite text editor.
Variations on a theme include:
wmic qfe list full
wmic qfe get HotfixID,ServicePackInEffect,InstallDate,InstalledBy,InstalledOn
wmic qfe where "HotfixID = 'KB973687'"
wmic qfe where "HotfixID = 'KB973687'" get HotfixID, InstallDate, InstalledBy, InstalledOn
wmic qfe where "HotfixID = 'KB973687'" list full
wmic /node:myserver qfe list full
Option 3
Use Powershell to do the same thing. This is simply:
- Local:
get-wmiobject -class win32_quickfixengineering
- Remote:
get-wmiobject -class win32_quickfixengineering -computername mysever
Again, this can take filters, for example:
get-wmiobject -class win32_quickfixengineering -filter "HotfixID = 'KB979683'"
...or as it's Powershell, just pipe through where-object
.
Option 4
It looks like recent versions of Windows don't use QFE in the same way. If it looks like you have an incomplete list, then you can try this instead:
$Session = New-Object -ComObject Microsoft.Update.Session
$Searcher = $Session.CreateUpdateSearcher()
$Searcher.Search("IsInstalled=1").Updates | ft -a Date,Title
(source for this brief script: an answer on Superuser for Why are “get-hotfix” and “wmic qfe list” in Powershell missing installed updates?).
Solution 2:
Check out the "Microsoft Baseline Security Analyzer". I believe it is the tool that you are looking for. See http://www.microsoft.com/mbsa and the associated Wikipedia article.
"Microsoft Baseline Security Analyzer (MBSA) is an easy-to-use tool designed for the IT professional that helps small- and medium-sized businesses determine their security state in accordance with Microsoft security recommendations and offers specific remediation guidance. Improve your security management process by using MBSA to detect common security misconfigurations and missing security updates on your computer systems."
Solution 3:
Quick and Dirty method: Browse the hidden folders in C:\Windows - the $NTUninstallKBxxxxxx refer to the KB Article that discusses the patch. The date on the folder is when it was installed.