Export (0) Print
Expand All

ManagementClass Class

Represents a Common Information Model (CIM) management class. A management class is a WMI class such as Win32_LogicalDisk, which can represent a disk drive, and Win32_Process, which represents a process such as Notepad.exe. The members of this class enable you to access WMI data using a specific WMI class path. 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)

[SerializableAttribute]
public class ManagementClass : ManagementObject

The ManagementClass type exposes the following members.

  NameDescription
Public methodManagementClass()Initializes a new instance of the ManagementClass class. This is the default constructor.
Public methodManagementClass(ManagementPath)Initializes a new instance of the ManagementClass class. 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.
Public methodManagementClass(String)Initializes a new instance of the ManagementClass class initialized to the given path. 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.
Public methodManagementClass(ManagementPath, ObjectGetOptions)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.
Protected methodManagementClass(SerializationInfo, StreamingContext)Initializes a new instance of the ManagementClass class from the specified instances of the SerializationInfo and StreamingContext classes.
Public methodManagementClass(String, ObjectGetOptions)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.
Public methodManagementClass(ManagementScope, ManagementPath, ObjectGetOptions)Initializes a new instance of the ManagementClass class for the specified WMI class in the specified scope and with 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.
Public methodManagementClass(String, String, ObjectGetOptions)Initializes a new instance of the ManagementClass class for the specified WMI class, in the specified scope, and with 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.
Top

  NameDescription
Protected propertyCanRaiseEventsGets a value indicating whether the component can raise an event. (Inherited from Component.)
Public propertyClassPathGets or sets the path to the object's class. (Inherited from ManagementObject.)
Public propertyContainerGets the IContainer that contains the Component. (Inherited from Component.)
Public propertyDerivationGets an array containing all WMI classes in the inheritance hierarchy from this class to the top of the hierarchy.
Protected propertyDesignModeGets a value that indicates whether the Component is currently in design mode. (Inherited from Component.)
Protected propertyEventsGets the list of event handlers that are attached to this Component. (Inherited from Component.)
Public propertyItemGets access to property values through [] notation. This property is the indexer for the ManagementBaseObject class. You can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed property whose type is Object and whose index type is String. (Inherited from ManagementBaseObject.)
Public propertyMethodsGets or sets a collection of MethodData objects that represent the methods defined in the WMI class.
Public propertyOptionsGets or sets additional information to use when retrieving the object. (Inherited from ManagementObject.)
Public propertyPathGets or sets the path of the WMI class to which the ManagementClass object is bound. (Overrides ManagementObject.Path.)
Public propertyPropertiesGets a collection of PropertyData objects describing the properties of the management object. (Inherited from ManagementBaseObject.)
Public propertyQualifiersGets the collection of QualifierData objects defined on the management object. Each element in the collection holds information such as the qualifier name, value, and flavor. (Inherited from ManagementBaseObject.)
Public propertyScopeGets or sets the scope in which this object resides. (Inherited from ManagementObject.)
Public propertySiteGets or sets the ISite of the Component. (Inherited from Component.)
Public propertySystemPropertiesGets the collection of WMI system properties of the management object (for example, the class name, server, and namespace). WMI system property names begin with "__". (Inherited from ManagementBaseObject.)
Top

  NameDescription
Public methodCloneReturns a copy of the object. (Overrides ManagementObject.Clone().)
Public methodCompareToCompares this object to another, based on specified options. (Inherited from ManagementBaseObject.)
Public methodCopyTo(ManagementPath)Copies the object to a different location. (Inherited from ManagementObject.)
Public methodCopyTo(String)Copies the object to a different location. (Inherited from ManagementObject.)
Public methodCopyTo(ManagementOperationObserver, ManagementPath)Copies the object to a different location, asynchronously. (Inherited from ManagementObject.)
Public methodCopyTo(ManagementOperationObserver, String)Copies the object to a different location, asynchronously. (Inherited from ManagementObject.)
Public methodCopyTo(ManagementPath, PutOptions)Copies the object to a different location. (Inherited from ManagementObject.)
Public methodCopyTo(String, PutOptions)Copies the object to a different location. (Inherited from ManagementObject.)
Public methodCopyTo(ManagementOperationObserver, ManagementPath, PutOptions)Copies the object to a different location, asynchronously. (Inherited from ManagementObject.)
Public methodCopyTo(ManagementOperationObserver, String, PutOptions)Copies the object to a different location, asynchronously. (Inherited from ManagementObject.)
Public methodCreateInstanceInitializes a new instance of the WMI class.
Public methodCreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public methodDelete()Deletes the object. (Inherited from ManagementObject.)
Public methodDelete(DeleteOptions)Deletes the object. (Inherited from ManagementObject.)
Public methodDelete(ManagementOperationObserver)Deletes the object. (Inherited from ManagementObject.)
Public methodDelete(ManagementOperationObserver, DeleteOptions)Deletes the object. (Inherited from ManagementObject.)
Public methodDeriveDerives a new class from this class.
Public methodDispose()Releases all resources used by the Component. (Inherited from ManagementObject.)
Protected methodDispose(Boolean)Releases the unmanaged resources used by the Component and optionally releases the managed resources. (Inherited from Component.)
Public methodEqualsCompares two management objects. (Inherited from ManagementBaseObject.)
Protected methodFinalizeReleases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
Public methodGet()Binds WMI class information to the management object. (Inherited from ManagementObject.)
Public methodGet(ManagementOperationObserver)Binds to the management object asynchronously. (Inherited from ManagementObject.)
Public methodGetHashCodeServes as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. (Inherited from ManagementBaseObject.)
Public methodGetInstances()Returns the collection of all instances of the class.
Public methodGetInstances(EnumerationOptions)Returns the collection of all instances of the class using the specified options.
Public methodGetInstances(ManagementOperationObserver)Returns the collection of all instances of the class, asynchronously.
Public methodGetInstances(ManagementOperationObserver, EnumerationOptions)Returns the collection of all instances of the class, asynchronously, using the specified options.
Public methodGetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public methodGetMethodParametersReturns a ManagementBaseObject representing the list of input parameters for a method. (Inherited from ManagementObject.)
Protected methodGetObjectDataPopulates a SerializationInfo with the data necessary to deserialize the field represented by this instance. (Overrides ManagementObject.GetObjectData(SerializationInfo, StreamingContext).)
Public methodGetPropertyQualifierValueReturns the value of the specified property qualifier. (Inherited from ManagementBaseObject.)
Public methodGetPropertyValueGets an equivalent accessor to a property's value. (Inherited from ManagementBaseObject.)
Public methodGetQualifierValueGets the value of the specified qualifier. (Inherited from ManagementBaseObject.)
Public methodGetRelated()Gets a collection of objects related to the object (associators). (Inherited from ManagementObject.)
Public methodGetRelated(ManagementOperationObserver)Gets a collection of objects related to the object (associators) asynchronously. This call returns immediately, and a delegate is called when the results are available. (Inherited from ManagementObject.)
Public methodGetRelated(String)Gets a collection of objects related to the object (associators). (Inherited from ManagementObject.)
Public methodGetRelated(ManagementOperationObserver, String)Gets a collection of objects related to the object (associators). (Inherited from ManagementObject.)
Public methodGetRelated(String, String, String, String, String, String, Boolean, EnumerationOptions)Gets a collection of objects related to the object (associators). (Inherited from ManagementObject.)
Public methodGetRelated(ManagementOperationObserver, String, String, String, String, String, String, Boolean, EnumerationOptions)Gets a collection of objects related to the object (associators). (Inherited from ManagementObject.)
Public methodGetRelatedClasses()Retrieves classes related to the WMI class.
Public methodGetRelatedClasses(ManagementOperationObserver)Retrieves classes related to the WMI class, asynchronously.
Public methodGetRelatedClasses(String)Retrieves classes related to the WMI class.
Public methodGetRelatedClasses(ManagementOperationObserver, String)Retrieves classes related to the WMI class, asynchronously, given the related class name.
Public methodGetRelatedClasses(String, String, String, String, String, String, EnumerationOptions)Retrieves classes related to the WMI class based on the specified options.
Public methodGetRelatedClasses(ManagementOperationObserver, String, String, String, String, String, String, EnumerationOptions)Retrieves classes related to the WMI class, asynchronously, using the specified options.
Public methodGetRelationshipClasses()Retrieves relationship classes that relate the class to others.
Public methodGetRelationshipClasses(ManagementOperationObserver)Retrieves relationship classes that relate the class to others, asynchronously.
Public methodGetRelationshipClasses(String)Retrieves relationship classes that relate the class to others, where the endpoint class is the specified class.
Public methodGetRelationshipClasses(ManagementOperationObserver, String)Retrieves relationship classes that relate the class to the specified WMI class, asynchronously.
Public methodGetRelationshipClasses(String, String, String, EnumerationOptions)Retrieves relationship classes that relate this class to others, according to specified options.
Public methodGetRelationshipClasses(ManagementOperationObserver, String, String, String, EnumerationOptions)Retrieves relationship classes that relate the class according to the specified options, asynchronously.
Public methodGetRelationships()Gets a collection of associations to the object. (Inherited from ManagementObject.)
Public methodGetRelationships(ManagementOperationObserver)Gets a collection of associations to the object. (Inherited from ManagementObject.)
Public methodGetRelationships(String)Gets a collection of associations to the object. (Inherited from ManagementObject.)
Public methodGetRelationships(ManagementOperationObserver, String)Gets a collection of associations to the object. (Inherited from ManagementObject.)
Public methodGetRelationships(String, String, String, Boolean, EnumerationOptions)Gets a collection of associations to the object. (Inherited from ManagementObject.)
Public methodGetRelationships(ManagementOperationObserver, String, String, String, Boolean, EnumerationOptions)Gets a collection of associations to the object. (Inherited from ManagementObject.)
Protected methodGetServiceReturns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
Public methodGetStronglyTypedClassCode(Boolean, Boolean)Generates a strongly-typed class for a given WMI class.
Public methodGetStronglyTypedClassCode(CodeLanguage, String, String)Generates a strongly-typed class for a given WMI class. This function generates code for Visual Basic, C#, JScript, J#, or C++ depending on the input parameters.
Public methodGetSubclasses()Returns the collection of all subclasses for the class.
Public methodGetSubclasses(EnumerationOptions)Retrieves the subclasses of the class using the specified options.
Public methodGetSubclasses(ManagementOperationObserver)Returns the collection of all classes derived from this class, asynchronously.
Public methodGetSubclasses(ManagementOperationObserver, EnumerationOptions)Retrieves all classes derived from this class, asynchronously, using the specified options.
Public methodGetTextReturns a textual representation of the object in the specified format. (Inherited from ManagementBaseObject.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodInitializeLifetimeServiceObtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public methodInvokeMethod(String, Object[])Invokes a method on the object. (Inherited from ManagementObject.)
Public methodInvokeMethod(ManagementOperationObserver, String, Object[])Invokes a method on the object, asynchronously. (Inherited from ManagementObject.)
Public methodInvokeMethod(String, ManagementBaseObject, InvokeMethodOptions)Invokes a method on the WMI object. The input and output parameters are represented as ManagementBaseObject objects. (Inherited from ManagementObject.)
Public methodInvokeMethod(ManagementOperationObserver, String, ManagementBaseObject, InvokeMethodOptions)Invokes a method on the object, asynchronously. (Inherited from ManagementObject.)
Protected methodMemberwiseClone()Creates a shallow copy of the current Object. (Inherited from Object.)
Protected methodMemberwiseClone(Boolean)Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)
Public methodPut()Commits the changes to the object. (Inherited from ManagementObject.)
Public methodPut(ManagementOperationObserver)Commits the changes to the object, asynchronously. (Inherited from ManagementObject.)
Public methodPut(PutOptions)Commits the changes to the object. (Inherited from ManagementObject.)
Public methodPut(ManagementOperationObserver, PutOptions)Commits the changes to the object asynchronously and using the specified options. (Inherited from ManagementObject.)
Public methodSetPropertyQualifierValueSets the value of the specified property qualifier. (Inherited from ManagementBaseObject.)
Public methodSetPropertyValueSets the value of the named property. (Inherited from ManagementBaseObject.)
Public methodSetQualifierValueSets the value of the named qualifier. (Inherited from ManagementBaseObject.)
Public methodToStringReturns the full path of the object. This is an override of the default object implementation. (Inherited from ManagementObject.)
Top

  NameDescription
Public eventDisposedOccurs when the component is disposed by a call to the Dispose method. (Inherited from Component.)
Top

  NameDescription
Explicit interface implemetationPrivate methodISerializable.GetObjectDataImplements the System.Runtime.Serialization.ISerializable interface and returns the data needed to serialize the ManagementBaseObject. (Inherited from ManagementBaseObject.)
Top

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft