更新:2007 年 11 月
基于指定的查询检索管理对象的集合。此类是用于检索管理信息的较为常用的入口点之一。例如,它可以用于枚举系统中的所有磁盘驱动器、网络适配器、进程及更多管理对象,或者用于查询所有处于活动状态的网络连接以及暂停的服务等。 在实例化之后,此类的实例可以接受在 ObjectQuery 或其派生类中表示的 WMI 查询作为输入,并且还可以选择接受一个 ManagementScope(表示执行查询时所在的 WMI 命名空间)。它还可以接受 EnumerationOptions 中的其他高级选项。当调用此对象的 Get()()() 方法时,ManagementObjectSearcher 在指定的范围内执行给定的查询,并返回与 ManagementObjectCollection 中的查询匹配的管理对象的集合。
Public Class ManagementObjectSearcher _ Inherits Component
Dim instance As ManagementObjectSearcher
public class ManagementObjectSearcher : Component
public ref class ManagementObjectSearcher : public Component
public class ManagementObjectSearcher extends Component
Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98