I just came across this WMI Code Creator tool released by Microsoft 2005. First test quickly generated useful code for me. The generated code is version .Net 1.1, but useful in .Net 2.0 too because System.Management namespace wasn't changed much. Current download link.
Most useful link: Windows Management Instrumentation reference at MSDN. (you can also click to get relevant class docs from within WMI Code Creator application)
On the topic of WMI tools, also don't forget the WMI Tester that is included in Windows system, you can Run it from Start menu (Wbemtest.exe). It's excellent for testing and verifying WQLs when you are uncertain about code or connection.Brief Description
The WMI Code Creator tool allows you to generate VBScript, C#, and VB .NET code that uses WMI to complete a management task such as querying for management data, executing a method from a WMI class, or receiving event notifications using WMI.
Most useful link: Windows Management Instrumentation reference at MSDN. (you can also click to get relevant class docs from within WMI Code Creator application)