ManagementClass Constructor (String^, ObjectGetOptions^)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Initializes a new instance of the ManagementClass class initialized to the given WMI class path using the specified options. The class represents a Common Information Model (CIM) management class from WMI such as Win32_LogicalDisk, which can represent a disk drive, and Win32_Process, which represents a process such as Notepad.exe. For more information, see "Win32 Classes" in the Windows Management Instrumentation documentation in the MSDN Library at http://msdn.microsoft.com/library.

Namespace:   System.Management
Assembly:  System.Management (in System.Management.dll)

public:
ManagementClass(
	String^ path,
	ObjectGetOptions^ options
)

Parameters

path
Type: System::String^

The path to the WMI class. The class represents a CIM management class from WMI. CIM classes represent management information including hardware, software, processes, and so on. For more information about the CIM classes available in Windows, see "Win32 classes" in the Windows Management Instrumentation documentation in the MSDN Library at http://msdn.microsoft.com/library.

options
Type: System.Management::ObjectGetOptions^

An ObjectGetOptions representing the options to use when retrieving the WMI class.

Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.

The following example shows how to initialize a ManagementClass variable with a ManagementClass constructor. The example lists the methods, properties, and qualifiers (including the amended qualifiers) for the created class.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: