System.Management 命名空間

提供對管理資訊和管理事件的豐富集合的存取,這些是有關檢測 Windows Management Instrumentation (WMI) 基礎結構內的系統、裝置和應用程式。 Provides access to a rich set of management information and management events about the system, devices, and applications instrumented to the Windows Management Instrumentation (WMI) infrastructure. 應用程式和服務可以使用衍生自 ManagementObjectSearcherManagementQuery 的類別來查詢相關的管理資訊 (例如,磁碟上剩下多少可用空間、目前 CPU 使用率如何、某特定應用程式連接至哪個資料庫等),或使用 ManagementEventWatcher 類別來訂閱各種管理事件。 Applications and services can query for interesting management information (such as how much free space is left on the disk, what is the current CPU utilization, which database a certain application is connected to, and much more), using classes derived from ManagementObjectSearcher and ManagementQuery, or subscribe to a variety of management events using the ManagementEventWatcher class. 可存取的資料都可以來自分散式環境中的 Managed 和 Unmanaged 兩種元件。 The accessible data can be from both managed and unmanaged components in the distributed environment.

類別

CompletedEventArgs

保留 Completed 事件的事件資料。Holds event data for the Completed event.

ConnectionOptions

指定要進行 WMI 連接所需的所有設定。Specifies all settings required to make a WMI connection.

DeleteOptions

指定刪除管理物件的選項。Specifies options for deleting a management object.

EnumerationOptions

為查詢和與列舉型別 (Enumeration) 相關的選項物件提供基底類別。Provides a base class for query and enumeration-related options objects.

EventArrivedEventArgs

保留 EventArrived 事件的事件資料。Holds event data for the EventArrived event.

EventQuery

表示 WMI「事件查詢」。Represents a WMI event query.

EventWatcherOptions

指定管理事件監看的選項。Specifies options for management event watching.

InvokeMethodOptions

指定叫用 (Invoke) 管理方法的選項。Specifies options for invoking a management method.

ManagementBaseObject

包含管理物件的基本項目。Contains the basic elements of a management object. 它是做為較特定管理物件類別的基本類別。It serves as a base class to more specific management object classes.

ManagementClass

表示通用訊息模型 (CIM) 管理類別。Represents a Common Information Model (CIM) management class. 管理類別是指 WMI 類別,例如可以表示磁碟機的 Win32_LogicalDisk,以及可以表示 Notepad.exe 等處理序的 Win32_ProcessA 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. 此類別的成員可讓您存取使用特定 WMI 類別路徑的 WMI 資料。The members of this class enable you to access WMI data using a specific WMI class path. 如需詳細資訊,請參閱 MSDN Library (https://msdn.microsoft.com/library) 之《Windows Management Instrumentation》文件中的<Win32 類別>。For more information, see "Win32 Classes" in the Windows Management Instrumentation documentation in the MSDN Library at https://msdn.microsoft.com/library.

ManagementDateTimeConverter

提供方法,將 DMTF 日期時間和時間間隔轉換為符合 CLR 標準的 DateTimeTimeSpan 格式,反之亦然。Provides methods to convert DMTF datetime and time intervals to CLR-compliant DateTime and TimeSpan format and vice versa.

ManagementEventArgs

表示保留 WMI 事件的事件資料的虛擬基底類別 (Virtual Base Class)。Represents the virtual base class to hold event data for WMI events.

ManagementEventWatcher

訂閱暫時性事件告知,該告知以指定的「事件查詢」為基礎。Subscribes to temporary event notifications based on a specified event query.

ManagementException

表示管理例外狀況。Represents management exceptions.

ManagementNamedValueCollection

代表適用於作為 WMI 作業內容資訊的具名值集合。Represents a collection of named values suitable for use as context information to WMI operations. 名稱不區分大小寫。The names are case-insensitive.

ManagementObject

表示 WMI 執行個體。Represents a WMI instance.

ManagementObjectCollection

表示經由 WMI 所擷取的各種管理物件集合。Represents different collections of management objects retrieved through WMI. 這個集合中的物件屬於 ManagementBaseObject 所衍生的型別,其中包括 ManagementObjectManagementClassThe objects in this collection are of ManagementBaseObject-derived types, including ManagementObject and ManagementClass. 集合可以是執行 WMI 查詢 (經由 ManagementObjectSearcher) 的結果,或指定型別 (經由表示該型別的 ManagementClass 所擷取) 之管理物件的列舉型別 (Enumeration)。The collection can be the result of a WMI query executed through a ManagementObjectSearcher, or an enumeration of management objects of a specified type retrieved through a ManagementClass representing that type. 此外,還可以是在指定方面與特定管理物件相關聯的管理物件集合;在這種情況下,集合將會經由例如 GetRelated() 這樣的方法來擷取。In addition, this can be a collection of management objects related in a specified way to a specific management object - in this case the collection would be retrieved through a method such as GetRelated(). 集合可以使用 ManagementObjectCollection.ManagementObjectEnumerator 來輕鬆運用,而其中物件也可以因應各種管理工作加以檢查或操作。The collection can be walked using the ManagementObjectCollection.ManagementObjectEnumerator and objects in it can be inspected or manipulated for various management tasks.

ManagementObjectCollection.ManagementObjectEnumerator

表示集合上的列舉值。Represents the enumerator on the collection.

ManagementObjectSearcher

根據指定的查詢擷取管理物件的集合。Retrieves a collection of management objects based on a specified query. 這個類別是其中一個較為經常用來擷取管理資訊的進入點 (Entry Point)。This class is one of the more commonly used entry points to retrieving management information. 例如,它可以用來列舉所有磁碟機、網路介面卡 (Adapter)、處理序和系統上其他更多的管理物件,或用來查詢所有正在使用的網路連接、暫停的服務,等等。For example, it can be used to enumerate all disk drives, network adapters, processes and many more management objects on a system, or to query for all network connections that are up, services that are paused, and so on. 執行個體化時,這個類別的執行個體會將 ObjectQuery 或其系出物件所表示的 WMI 查詢當做輸入,也會選擇性將表示執行查詢所在 WMI 命名空間的 ManagementScope 當做輸入。When instantiated, an instance of this class takes as input a WMI query represented in an ObjectQuery or its derivatives, and optionally a ManagementScope representing the WMI namespace to execute the query in. 此外,它在 EnumerationOptions 中可以接受額外的進階選項。It can also take additional advanced options in an EnumerationOptions. 叫用這個物件的 Get() 方法時,ManagementObjectSearcher 會在指定範圍中執行指定的查詢,並傳回 ManagementObjectCollection 中符合查詢的管理物件集合。When the Get() method on this object is invoked, the ManagementObjectSearcher executes the given query in the specified scope and returns a collection of management objects that match the query in a ManagementObjectCollection.

ManagementOperationObserver

管理非同步作業 (Asynchronous Operation),並處理非同步接收的管理資訊及事件。Manages asynchronous operations and handles management information and events received asynchronously.

ManagementOptions

抽象基底類別 (Abstract Base Class) 提供給所有的選項物件。Provides an abstract base class for all options objects.

ManagementPath

提供包裝函式剖析和建立通往 WMI 物件的路徑。Provides a wrapper for parsing and building paths to WMI objects.

ManagementQuery

提供抽象基底類別 (Base Class) 給所有管理查詢物件。Provides an abstract base class for all management query objects.

ManagementScope

表示管理作業的範圍 (命名空間)。Represents a scope (namespace) for management operations.

MethodData

包含 WMI 方法的資訊。Contains information about a WMI method.

MethodDataCollection

表示在集合中可用的方法集。Represents the set of methods available in the collection.

MethodDataCollection.MethodDataEnumerator

表示 MethodDataCollection 中的 MethodData 物件列舉值。Represents the enumerator for MethodData objects in the MethodDataCollection.

ObjectGetOptions

指定取得管理物件的選項。Specifies options for getting a management object.

ObjectPutEventArgs

保留 ObjectPut 事件的事件資料。Holds event data for the ObjectPut event.

ObjectQuery

表示傳回執行個體 (Instance) 或類別的管理查詢。Represents a management query that returns instances or classes.

ObjectReadyEventArgs

保留 ObjectReady 事件的事件資料。Holds event data for the ObjectReady event.

ProgressEventArgs

保留 Progress 事件的事件資料。Holds event data for the Progress event.

PropertyData

表示 WMI 屬性的相關資訊。Represents information about a WMI property.

PropertyDataCollection

表示 WMI 物件的屬性集。Represents the set of properties of a WMI object.

PropertyDataCollection.PropertyDataEnumerator

表示 PropertyDataCollection 中的 PropertyData 物件列舉值。Represents the enumerator for PropertyData objects in the PropertyDataCollection.

PutOptions

指定認可管理物件變更的選項。Specifies options for committing management object changes.

QualifierData

包含 WMI 限定詞 (Qualifier) 的相關資訊。Contains information about a WMI qualifier.

QualifierDataCollection

表示 QualifierData 物件的集合。Represents a collection of QualifierData objects.

QualifierDataCollection.QualifierDataEnumerator

表示 QualifierDataCollection 中的 QualifierData 物件列舉值。Represents the enumerator for QualifierData objects in the QualifierDataCollection.

RelatedObjectQuery

表示 WQL ASSOCIATORS OF 資料查詢。Represents a WQL ASSOCIATORS OF data query. 它可以用於執行個體 (Instance) 和結構描述 (Schema) 查詢。It can be used for both instances and schema queries.

RelationshipQuery

表示 WQL REFERENCES OF 資料查詢。Represents a WQL REFERENCES OF data query.

SelectQuery

表示 WQL SELECT 資料查詢。Represents a WQL SELECT data query.

StoppedEventArgs

保留 Stopped 事件的事件資料。Holds event data for the Stopped event.

WqlEventQuery

表示使用 WQL 格式的 WMI 事件查詢。Represents a WMI event query in WQL format.

WqlObjectQuery

表示使用 WQL 格式的 WMI 資料查詢。Represents a WMI data query in WQL format.

列舉

AuthenticationLevel

描述用來連接至 WMI 的驗證 (Authentication) 層級。 這是用於對 WMI 的 COM 連接。This is used for the COM connection to WMI.

CimType

描述屬性、限定詞或方法參數的可能 CIM 類型。Describes the possible CIM types for properties, qualifiers, or method parameters.

CodeLanguage

定義程式碼產生器所支援的語言。Defines the languages supported by the code generator.

ComparisonSettings

描述可以搭配 CompareTo(ManagementBaseObject, ComparisonSettings) 使用的物件比對模式。Describes the object comparison modes that can be used with CompareTo(ManagementBaseObject, ComparisonSettings). 請注意,這些值可以會合併。Note that these values may be combined.

ImpersonationLevel

描述用來連接至 WMI 的模擬等級。Describes the impersonation level to be used to connect to WMI.

ManagementStatus

描述目前定義之所有 WMI 錯誤碼的列舉型別 (Enumeration)。Describes the enumeration of all WMI error codes that are currently defined.

PutType

描述使用 Put() 時,將物件儲存至 WMI 的可能影響。Describes the possible effects of saving an object to WMI when using Put().

TextFormat

描述能以 GetText(TextFormat) 使用的可能文字格式。Describes the possible text formats that can be used with GetText(TextFormat).

委派

CompletedEventHandler

代表將處理 Completed 事件的方法。Represents the method that will handle the Completed event.

EventArrivedEventHandler

代表將處理 EventArrived 事件的方法。Represents the method that will handle the EventArrived event.

ObjectPutEventHandler

代表將處理 ObjectPut 事件的方法。Represents the method that will handle the ObjectPut event.

ObjectReadyEventHandler

代表將處理 ObjectReady 事件的方法。Represents the method that will handle the ObjectReady event.

ProgressEventHandler

代表將處理 Progress 事件的方法。Represents the method that will handle the Progress event.

StoppedEventHandler

代表將處理 Stopped 事件的方法。Represents the method that will handle the Stopped event.