关于 WMIAbout WMI

Windows Management Instrumentation (WMI) 是 Microsoft 对基于 Web 的企业管理 (WBEM) 的实现,WBEM 是一项业界倡议,用于为访问企业环境中的管理信息开发一项标准技术。Windows Management Instrumentation (WMI) is the Microsoft implementation of Web-Based Enterprise Management (WBEM), which is an industry initiative to develop a standard technology for accessing management information in an enterprise environment. WMI 使用通用信息模型 (CIM) 行业标准来表示系统、应用程序、网络、设备和其他托管组件。WMI uses the Common Information Model (CIM) industry standard to represent systems, applications, networks, devices, and other managed components. CIM 由分布式管理任务组 (DMTF) 来开发和维护。CIM is developed and maintained by the Distributed Management Task Force (DMTF).

备注

下一代 WMI (称为 Windows 管理基础结构 (MI) )当前可用。The next-generation of WMI, known as the Windows Management Infrastructure (MI), is currently available. MI 完全与以前版本的 WMI 兼容,并提供一种功能和优点,使设计和开发提供程序与客户端更容易。MI is fully compatible with previous versions of WMI, and provides a host of features and benefits that make designing and developing providers and clients easier than ever. 例如,许多较新的提供程序是使用 MI 框架编写的,但可使用 WMI 脚本和应用程序进行访问。For example, many newer providers are written using the MI framework, but can be accessed using WMI scripts and applications. 有关这两种技术之间的差异的详细信息,请参阅 为什么使用 MI?For more information about the differences between the two technologies, see Why Use MI?

用 WMI 管理远程计算机系统Managing Remote Computer Systems with WMI

从远程计算机获取管理数据的能力使 WMI 变得十分有用。The ability to obtain management data from remote computers is what makes WMI useful. 可以通过 DCOM 建立远程 WMI 连接。Remote WMI connections are made through DCOM. 一种替代方法是使用 Windows 远程管理 (WinRM) ,后者使用基于 SOAP 的 WS-Management 协议获取远程 WMI 管理数据。An alternative is to use Windows Remote Management (WinRM), which obtains remote WMI management data using the WS-Management SOAP-based protocol.

用 WMI 编程Programming with WMI

管理应用程序或脚本可以使用各种语言通过 WMI 获取数据或执行操作。Management applications or scripts can get data or perform operations through WMI in a variety of languages. 有关详细信息,请参阅 Windows Management Instrumentation的开发人员受众部分。For more information, see the Developer Audience section at Windows Management Instrumentation.

许多 Windows 功能都具有关联的 WMI 提供程序,如 引导配置数据 (BCD) 提供程序存储卷提供程序Many Windows features have associated WMI providers, like the Boot Configuration Data (BCD) Provider or the Storage Volume Provider. WMI 提供程序实现 WMI 类方法和属性所描述的功能,以管理关联的 Windows 功能。WMI Providers implement the functionality described by WMI classes methods and properties to manage associated Windows features. 有关详细信息,请参阅 Wmi 提供程序wmi 类For more information, see WMI Providers and WMI Classes.

有关如何编写提供程序以提供新硬件或应用程序中的数据的详细信息,请参阅 向 WMI 提供数据For more information about how to write a provider to supply data from new hardware or applications, see Providing Data to WMI.

有关如何实现此技术的详细信息,请参阅 使用 WMIFor more information about how to implement this technology, see Using WMI.

下表列出了本节中包含的主题。The following table lists topics included in this section.

部分Section 说明Description
WMI 中的新增功能What's New in WMI WMI 中的新增功能。New features in WMI.
WMI 组件的操作系统可用性Operating System Availability of WMI Components 有些组件不再可用,或者作为可选安装提供。Some components are no longer available or are available as an optional installation.
WMI 体系结构WMI Architecture 管理应用程序使用各种接口(如 Visual Basic、c + +、ODBC 和 ActiveX)与 WMI 通信。A management application communicates with WMI by using a variety of interfaces, such as Visual Basic, C++, ODBC, and ActiveX. 所有 WMI 接口都基于组件对象模型, (COM) 。All the WMI interfaces are based on the Component Object Model (COM).
通用信息模型Common Information Model 一种与语言无关的编程模型,它使用面向对象的技术来描述企业。A language independent programming model that uses object oriented techniques to describe an enterprise.
托管对象格式Managed Object Format 一种格式,使您可以创建可读的代码,操作系统可将该代码转换为一组 CIM 类。A format that enables you to create human-readable code, which the operating system can translate into a set of CIM classes. 您可以使用新类来为企业建模和控制新技术。You can use the new classes to model and control new technologies for an enterprise.
用户帐户控制和 WMIUser Account Control and WMI 用户帐户控制 (UAC) 会影响返回的 WMI 数据、远程访问以及必须如何运行脚本。User Account Control (UAC) affects what WMI data is returned, remote access, and how scripts must be run. 有关详细信息,请参阅 Windows Vista 上的用户帐户控制入门For more information, see Getting Started with User Account Control on Windows Vista.
访问 WMI 安全对象Access to WMI Securable Objects WMI 使用标准 Windows 安全对象和过程来控制和保护对安全对象(如 WMI 命名空间、打印机、服务和 DCOM 应用程序)的访问。WMI uses standard Windows security objects and procedures to control and protect access to securable objects like WMI namespaces, printers, services, and DCOM applications.
性能库和 WMIPerformance Libraries and WMI WMI 类提供系统性能计数器中的数据。Data from the system performance counters is available in WMI classes.
WMI 中的 IPv6 和 IPv4 支持IPv6 and IPv4 Support in WMI WMI IP 路由提供程序 和网络类提供 IPv4 地址的数据。WMI IP Route Provider and network classes supply data for IPv4 addresses. 从 Windows Vista 开始,WMI 还为 IPv6 网络功能提供有限的支持。Starting with Windows Vista, WMI also provides limited support for IPv6 network capabilities.
日期和时间格式Date and Time Format WMI 使用分布式管理任务强制 CIM 规范定义的日期和时间格式。WMI uses the date and time formats defined by the Distributed Management Task Force CIM specification. 有关详细信息,请参阅 DMTFFor more information, see DMTF.
脚本访问 WMIScripting Access to WMI 编写 WMI 脚本来执行管理任务。Write WMI scripts to perform management tasks.
WMI 故障排除WMI Troubleshooting 在应用程序或脚本中访问 WMI 本地或远程数据时,可能会收到来自缺少类的错误,拒绝访问。When accessing WMI local or remote data in an application or script, you may receive errors ranging from missing classes to access denied. 提供程序还提供调试选项和故障排除类。Providers also have debugging options and troubleshooting classes available.
其他信息Further Information 有关 WMI 的网站、书籍和文章。Websites, books, and articles about WMI.

使用 WMIUsing WMI

WMI 参考WMI Reference