<mgmtclassgen>

A task that generates strongly typed WMI classes using mgmtclassgen.exe.

The Management Strongly Typed Class Generator enables you to quickly generate an early-bound managed class for a specified Windows Management Instrumentation (WMI) class. The generated class simplifies the code you must write to access an instance of the WMI class.

Parameters

AttributeTypeDescriptionRequired
wmiclassstring Specifies the name of the WMI class to generate the strongly typed class True
languagestring Specifies the language in which to generate the class. Possible values are: CS, VB, JS False
machinestring Specifies the machine to connect to. False
namespacestring Namespace of the generated .NET class False
outstring Path of the file to generate False
passwordstring Password to use when connecting to the specified machine False
pathstring Specifies the path to the WMI namespace that contains the class. False
usernamestring User name to use when connecting to the specified machine False
failonerrorboolFalse
ifboolFalse
timeoutintFalse
unlessboolFalse
verboseboolFalse

Framework-configurable parameters

AttributeTypeDescriptionRequired
exenamestringFalse
useruntimeengineboolFalse

Nested Elements:

<arg>

</arg>

Examples

              <mgmtclassgen 
                    wmiclass="Win32_LogicalDisk" 
                    language="CS"
                    machine="SomeMachine"
                    path="Root\cimv2"
                    namespace="Winterdom.WMI"
                    out="${outputdir}\LogicalDisk.cs"
                    username="Administrator"
                    password="password"
              />