Listing SUS Hotfixes


\[Editor's Note: Share your scripting discoveries, comments, problems, solutions, and experiences with products. Email your contributions (500 words or less) to [email protected] We edit submissions for style, grammar, and length. If we print your submission, you'll get $100.\]

I've been using Microsoft Software Update Services (SUS) to apply hotfixes to all the workstations at my site. Although the program works great, it can't tell you specifically which workstations have applied the approved hotfixes.

The recommended solution is to sort through the Microsoft IIS logs, which is a tedious process. After I read the Microsoft Windows 2000 Scripting Guide, I decided to write a script to solve my problem.

Hotfix.vbs, which Listing 1 shows, uses one computer as a legend or template against which the script compares all other computers. By default, the legend computer is the computer that the script runs on. You need to install Microsoft Excel on the legend machine. You also need to apply all the hotfixes to that machine before running the script.

The script sends all the hotfixes for the legend computer to Excel on the first sheet, which is labeled Legend. The script creates a second sheet, labeled Applied Hotfixes, on which the hotfixes appear as columns and the scanned computers appear as rows. The script pings each computer; when the computer is accessible, Yes appears in the appropriate column for each hotfix applied.

The script uses a Lightweight Directory Access Protocol (LDAP) query to Active Directory (AD) to build a list of computers. However, you can easily change the script to import computer names from a file or command line.

Excel activates early in the script, then I switch to the Applied Hotfixes tab to monitor the script's progress. A script complete message box appears on completion.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.