One of the developer resources useful to IT folks that you might overlook in the vastness of microsoft.com is -- deep breath -- the Application Compatibility Testing and Mitigation Guide for Windows XP Service Pack 2

This download contains documentation and scripts for handling issues of application compatibility that also deal with problems that most sysadmins will face in deploying SP2.

On the Scripting Solutions Center of TechNet Script Center we've posted a set of supplemental scripts with their own readme that show how to perform most of the tasks in the Application Compatibility Guide, using WMI or the new Windows Firewall COM object model.  The Guide's scripts use mostly WSH and batch files.  The two sets of scripts complement each other -- there's something for everyone's needs and scripting preferences.

Windows XP Service Pack 2 Application Compatibility - Supplemental Scripts

Let us know how you're handling the deployment and management of SP2 and what issues you're encountering at:
scripter@microsoft.com