`

WMI Troubleshooting

 
阅读更多

When accessing WMI local or remote data in an application or script, you may encounter errors ranging from missing classes to access denied. Providers also have debugging options and troubleshooting classes available. For more information about troubleshooting problems with WMI scripts and the WMI service, see WMI Isn't Working!

WMI Diagnosis Utility

If WMI returns error messages, be aware that they may not indicate problems in the WMI service or in WMI providers. Failures can originate in other parts of the operating system and emerge as errors through WMI. Under any circumstances, do not delete the WMI repository as a first action because deleting the repository can cause damage to the system or to installed applications.

To obtain more information about the source of the problem, you can download and run the WMI Diagnosis Utility diagnostic command line tool. This tool produces a report that can usually isolate the source of the problem and provide instructions on how to fix it. The report also aids Microsoft support services in assisting you. You can download the WMI Diagnosis Utility at the Download Center.

 

Provider writers may also encounter debugging issues unless you are writing a decoupled provider. For more information, see Debugging Providers.

Logging and Tracing

Starting with Windows Vista, the WMI log files no longer exist. They are replaced by Event Tracing for Windows (ETW). For more information, see Tracing WMI Activity, Logging WMI Activity, and WMI Log Files.

Troubleshooting in Scripts and Applications

WMI contains a set of classes for troubleshooting client applications that use WMI providers. For more information, see Troubleshooting WMI Client Applications.

How Provider Writers Can Prevent WMI Problems

 

Provider writers can prevent many problems, which appear in error messages through WMI, by performing the following actions:

  • Registering your provider correctly. For more information, see Registering a Provider.
  • Adding the #pragma autorecover statement to the Managed Object Format (MOF) file that defines your provider classes.

For more information, see Debugging Providers, Providing Data to WMI, and Provider Configuration and Troubleshooting Classes.

Access Denied

Access Denied errors that are reported by scripts and applications that access WMI namespaces and data generally fall into three categories. The following table lists the three categories of errors along with issues that might cause the errors and possible solutions.

Error Possible Issues Solution

0x800706BA - RPC Server Unavailable

Firewall issue or server not available.

The computer really doesn't exist · The Windows Firewall is blocking the connection Connecting to Vista: netsh advfirewall firewall set rule group="windows management instrumentation (wmi)" new enable=yes Connecting to downlevel: Allow the "Remote Administration" rule in Windows Firewall.

0x80070005 – E_ACCESS_DENIED

Access denied by DCOM security.

The user does not have remote access to the computer through DCOM. Typically, DCOM errors occur when connecting to a remote computer with a different operating system version. Give the user Remote Launch and Remote Activation permissions in dcomcnfg. Right-click My Computer-> Properties Under COM Security, click "Edit Limits" for both sections. Give the user you want remote access, remote launch, and remote activation. Then go to DCOM Config, find "Windows Management Instrumentation", and give the user you want Remote Launch and Remote Activation. For more information, see Connecting Between Different Operating Systems

0x80041003 – WMI Access Denied

Access denied by a provider

The user does not have permission to perform the operation in WMI. This could happen when you query certain classes as a low-rights user, but most often happens when you attempt to invoke methods or change WMI instances as a low rights user. The namespace you are connecting to is encrypted, and the user is attempting to connect with an unencrypted connection Give the user access with the WMI Control (make sure they have Remote_Access set to true) Connect using a client that supports encryption.

 

  • Typically, DCOM errors occur when connecting to a remote computer with a different operating system version.

  • Providers may also deny access to data in specific namespaces or may require certain levels of connection security. For more information, see Setting Client Application Process Security and Provider Hosting and Security.

  • Access denied errors from Internet Connection Firewall (ICF) changes.

    The firewall is enabled in the Windows XP with Service Pack 2 (SP2) client, but not in Windows Server 2003 with Service Pack 1 (SP1) or Windows Server 2003 R2. For more information, see Connecting Through Windows Firewall.

    Windows Server 2003, Windows XP, Windows 2000, Windows NT, and Windows Me/98/95:  ICF does not exist.
  • An access denied error is returned by DCOM security when a low-integrity client tries to access WMI. For example, an ActiveX control that is running in Internet Explorer, which has the security level set to low, does not have access to perform local WMI operations.
    Windows 7:  Low-integrity users have read-only permissions for local WMI operations.

Information on Errors

When you get an error message from WMI, you can locate the message in WMI Error Constants or, for scripting, WbemErrorEnum. However, the information supplied by the error alone is typically insufficient to determine what is happening. WMI repository corruption may masquerade as classes or instances "not found".

 

For more information about WMI errors:

Related topics

WMI Troubleshooting
Tracing WMI Activity
Logging WMI Activity
分享到:
评论

相关推荐

    WMI Tools (wmitools)

    官方版WMI tools,系统检测工具。

    wmi.rar_C# WMI_windows wmi_wmi_wmi proerties

    Windows Management Instrumentation(WMI)是Windows操作系统提供的一种管理和配置计算机环境的方法。它允许应用程序通过标准接口访问系统信息,如硬件状态、软件设置、网络配置等。C#作为.NET框架的一部分,提供了...

    WMI.rar_wmi

    Windows Management Instrumentation(WMI)是微软开发的一种管理规范,用于提供系统管理和脚本编写的信息。它是Windows操作系统的核心组成部分,允许应用程序和脚本语言访问、配置和管理运行在Windows环境中的硬件...

    WmiTools(windows系统工具)

    **WmiTools:Windows系统工具详解** WmiTools是一款针对Windows操作系统的实用工具,它主要利用Windows Management Instrumentation(WMI)技术来提供强大的系统信息查询功能。WMI是微软提供的一个核心组件,用于...

    非常好用的WMI编程工具(WMITools)

    **WMI(Windows Management Instrumentation)编程工具是IT专业人员在管理系统时不可或缺的资源,而WMITools就是这样一个专门用于WMI操作的强大工具。本文将深入探讨WMI的基础概念、重要性以及WMITools如何帮助我们...

    WMI工具wmitools.zip

    标题中的"WMI工具wmitools.zip"指的是Windows Management Instrumentation (WMI)工具的压缩包,其中包含了WMITools.exe程序。WMI是微软提供的一个系统管理接口,它允许管理员和其他应用程序通过标准的脚本语言(如...

    WMITools 查看工具

    【WMITools 查看工具】是一款专用于Windows操作系统下的管理工具,它提供了强大的Windows Management Instrumentation(WMI)查询和管理功能。WMI是微软的一种系统管理架构,它允许管理员和其他应用程序通过标准的...

    WMI工具,清理WMI执行文件

    WMI(Windows Management Instrumentation)是Windows操作系统中的一个核心组件,它提供了一种标准的方法来管理系统和应用程序,允许管理员和开发者获取系统信息、监控性能、配置系统设置以及执行管理任务。WMI工具...

    WmiExplorer.rar

    **Windows Management Instrumentation (WMI) 是微软提供的一种操作系统级别的管理框架,用于访问和操作Windows系统中的各种配置、性能和事件信息。WMIExplorer.rar是一个压缩包,包含了一个名为"WmiExplorer.exe"的...

    wmi技术指南PDF

    **Windows Management Instrumentation (WMI) 技术指南** Windows Management Instrumentation(WMI)是Microsoft Windows操作系统中的一个核心组件,它提供了一种统一的方法来管理本地和远程系统的硬件、软件和...

    C++调用WMI遍历进程

    在IT领域,Windows Management Instrumentation(WMI)是Windows操作系统提供的一个核心组件,它允许应用程序通过标准接口访问和管理系统的各种资源,如硬件、软件、网络等。C++调用WMI来遍历进程,是一种常见的系统...

    wmi纯java调用所需jar包.zip

    WMI(Windows Management Instrumentation)是微软Windows操作系统提供的一种管理和操作环境,允许应用程序通过标准接口访问和控制操作系统、硬件设备和服务等系统资源的信息。在Java环境中,若要进行WMI调用,通常...

    wmi修复工具

    **WMI修复工具详解** Windows Management Instrumentation(WMI)是微软提供的一个核心组件,它为操作系统和其他应用程序提供了一个统一的接口,以便管理和监控系统硬件、软件以及操作系统服务。WMI允许开发者通过...

    怎样使用WMI查询

    WMI(Windows Management Instrumentation,Windows管理规范)是微软提供的一种强大的系统管理和远程控制工具,它允许管理员和其他应用程序通过标准接口来访问和操作Windows操作系统中的各种管理信息。WMI是基于WBEM...

    wmi 的使用方法

    Windows Management Instrumentation(WMI)是微软提供的一个标准的管理基础设施,它允许应用程序和脚本访问和管理操作系统、硬件设备和服务等系统资源的信息。通过WMI,你可以执行各种任务,如监控系统性能、配置...

    WMI信息Class代码生成器WMIclass[WMIclass.rar]-精品源代码

    **WMI信息Class代码生成器WMIclass简介** Windows Management Instrumentation(WMI)是Microsoft提供的一个管理系统和服务的接口,它允许应用程序通过脚本或编程方式获取和操作系统的各种信息,如硬件配置、系统...

    WMI 代码生成器

    **WMI代码生成器**是一种实用工具,专为开发者设计,能够自动生成针对Windows Management Instrumentation(WMI)接口的代码。WMI是Windows操作系统提供的一种标准管理框架,它允许程序通过COM接口来访问和操作系统...

    无法连接到WMI 解决办法

    在IT领域,遇到“无法连接到WMI”的问题时,这通常意味着Windows Management Instrumentation(Windows管理规范)服务出现故障或配置错误。WMI是Windows操作系统中的一个核心组件,用于提供对系统硬件、操作系统和...

    WMI.rar_delphi wmi_wmi_wmi delphi

    标题中的"WMI.rar_delphi wmi_wmi_wmi delphi"表明这是一个关于使用Delphi与WMI交互的源码集合,可能包含了通过Delphi代码调用WMI服务的示例。 描述中的“访问Windows WMI对象的源码,可以使用WMQ语言进行查询”...

Global site tag (gtag.js) - Google Analytics