NAnt
Help
Task Reference
<mgmtclassgen> |
NAnt.Contrib.Tasks () |
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.| Attribute | Type | Description | Required |
|---|---|---|---|
| wmiclass | string | Specifies the name of the WMI class to generate the strongly typed class | True |
| language | string | Specifies the language in which to generate the class. Possible values are: CS, VB, JS | False |
| machine | string | Specifies the machine to connect to. | False |
| namespace | string | Namespace of the generated .NET class | False |
| out | string | Path of the file to generate | False |
| password | string | Password to use when connecting to the specified machine | False |
| path | string | Specifies the path to the WMI namespace that contains the class. | False |
| username | string | User name to use when connecting to the specified machine | False |
| failonerror | bool | False | |
| if | bool | False | |
| timeout | int | False | |
| unless | bool | False | |
| verbose | bool | False |
| Attribute | Type | Description | Required |
|---|---|---|---|
| exename | string | False | |
| useruntimeengine | bool | False |
<mgmtclassgen
wmiclass="Win32_LogicalDisk"
language="CS"
machine="SomeMachine"
path="Root\cimv2"
namespace="Winterdom.WMI"
out="${outputdir}\LogicalDisk.cs"
username="Administrator"
password="password"
/>