Monday, January 05, 2009

Cleanup WSUS - Remove Computers No Longer in the Domain

Another practical example of using IronPython for system administration, this one using WSUS (Windows Server Update Status).
One thing I love about WSUS is the ability to monitor the presence of clients. It gives me a good approximation of the last time a computer was on the network. I often use this information to help me clean missing computers out of Active Directory.

But what about when a computer is removed from the domain before it is removed from WSUS? Rather than manually checking, I wrote an IronPython script that compares the list of computers in Active Directory with the computers on WSUS. When I run this script, it lists computers that should be removed from WSUS, and deletes them for me (after prompting).
Requires WSUS 3.0 API, specifically Microsoft.UpdateServices.Administration.dll. As long as that library is available, the script doesn't need to be run on the server itself.

1 comment:

  1. Thanks for the spotlight!


Note: only a member of this blog may post a comment.