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).
Below is a copy of the script. It is written in Python, and I run it using IronPython 2.0 Release Candidate 1.
It requires the 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.
This script is released free of charge to do with as you please.