Thursday, April 22, 2004

I was afraid from WMI

I was afraid from WMI

"I was afraid from WMIUntil I found Microsoft (R) Management Strongly Typed Class Generator - MgmtClassGen.exe
Microsoft (R) Management Strongly Typed Class Generator Version 1.1.4322.573
Copyright c Microsoft Corporation 1998-2002. All rights reserved.
MgmtClassGen [options]
/N WMI namespace containing the class. Defaults to root\cimv2
/O .NET namespace in which the class is generated
/L One of the following. Defaulted to CS
CS - CSharp(C#)
VB - Visual Basic
JS - JScript
/P Output file path
/M Remote computer to connect. Defaults to the local machine
/U User name
/PW Password
/? Displays this help screen

Example :
MgmtclassGen Win32_Logicaldisk /L VB /N root\cimv2 /P c:\temp\logicaldisk.vb
You can find it under you sdk bin directory, so instead of figuring out the properties of the objects you get a strongly type object to work with."

Very Cool
(via Yosi Taguri's WebLog)

No comments: