The code generated from Kix-o-matic would be a great start, plus Radimus's WMIQuery is pretty much plug-and-play.