<p>How do you generate C# classes for accessing WMI?</p>

[{'answer_id': 44506, 'author': 'VanOrman', 'author_id': 4550, 'author_profile': 'https://Stackoverflow.com/users/4550', 'pm_score': 3, 'selected': False, 'text': '<p>To generate strongly typed WMI classes, use the Management Strongly typed class generator (MgmtClassGen.exe).  It\'s usually in C:\\Program Files\\Microsoft Visual Studio X\\SDK\\vX\\Bin.  The parameters are <a href="http://msdn.microsoft.com/en-us/library/2wkebaxa.aspx" rel="noreferrer">at MSDN</a> and they even have <a href="http://msdn.microsoft.com/en-us/library/ms186156.aspx" rel="noreferrer">a page</a> describing the code generated.  If you have to do a lot of work with WMI, it\'s a lifesaver.</p>\n'}, {'answer_id': 44635, 'author': 'Napco', 'author_id': 2539, 'author_profile': 'https://Stackoverflow.com/users/2539', 'pm_score': 2, 'selected': False, 'text': '<p>You can try WMICodeCreator it generates vbscript jscript vb.net and c# code\n<a href="http://www.microsoft.com/downloads/details.aspx?familyid=2cc30a64-ea15-4661-8da4-55bbc145c30e&amp;displaylang=en" rel="nofollow noreferrer">Download WMICodeCreator from Microsoft</a></p>\n'}, {'answer_id': 18749756, 'author': 'Donal Lafferty', 'author_id': 939250, 'author_profile': 'https://Stackoverflow.com/users/939250', 'pm_score': 3, 'selected': False, 'text': '<p><strong>Easier approach (Visual Studio users):</strong></p>\n\n<ol>\n<li><p>Add WMI classes to VisualStudio\'s Server Explorer.  E.g.</p>\n\n<p><img src="https://i.stack.imgur.com/R99EW.jpg" alt="enter image description here"> </p></li>\n<li><p>Get Visual Studio to call <a href="http://msdn.microsoft.com/en-us/library/2wkebaxa.aspx" rel="nofollow noreferrer">MgmtClassGen.exe</a> for you.  E.g. </p>\n\n<p><img src="https://i.stack.imgur.com/YCW27.jpg" alt="enter image description here"></p></li>\n</ol>\n\n<p>@VanOrman provides additional <a href="https://stackoverflow.com/a/44506/939250">references for MgmtClassGen.exe</a>.</p>\n'}]
['https://Stackoverflow.com/questions/44504', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4550/']