Windows 7 has a cool new extensible troubleshooting framework which is entirely based on PowerShell scripts. Rafael Rivera has written a very good step-by-step guide for how to author a Win7 Troubleshooting Pack HERE.
Check it out.
Experiment! Enjoy! Engage!
Jeffrey Snover [MSFT]
Windows Management Partner Architect
Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx