My organization has more than 600 Windows 2000 client machines. Each time Microsoft Software Update Services (SUS) downloads patches, there are always a few machines not properly patched due to unforeseeable problems. Because SUS doesn't have any reporting tools, it's difficult to determine which machines aren't patched. So, I wrote a script, KB.vbs, to report the status of all my machines. KB.vbs first attempts to ping the machines listed in an input file. If a PC is online, the script determines whether the specified patch file exists.
You can download KB.vbs from the Windows IT Pro Web site. Go to http://www.windowsitpro.com, enter 46953 in the InstantDoc ID text box, then click the 46953.zip hotlink.
To run KB.vbs, use the command
cscript kb.vbs filename
kbxxxxx
where filename is the pathname of the input file and kbxxxxx is the patch file you want to search for. For example, suppose the pathname to your input file, which Figure 1 shows, is C:\pclist.txt and the patch file you want to check for is KB835732. You'd use the command
cscript kb.vbs c:\pclist.txt
kb835732
To ensure accurate results, you must have Administrator permissions to the remote machines listed in the input file. The machine on which you run KB.vbs must have the latest VBScript engine, which is currently version 5.6.
Hi
i like the script, it's wonderful. Is it possible to check multiple kb numbers instead of just one. Appreciate if you could help me with this
thanks heaps
kasukur
I contacted James Lim about your question. He noted that he converted this script from VBScript to PowerShell. The PowerShell version reads multiple kb numbers.
I put the PowerShell version of the script (kblist.ps1) in the 46953.zip file, which you can obtain by clicking the "Download the Code Here" button at the top of the page. The kblist.ps1 script includes the syntax you'd use to launch it.
Hope this new script helps. Thanks for reading Windows IT Pro!
Karen Bemowski, senior editor
Windows IT Pro, SQL Server Magazine