Επεξεργασία

Κοινή χρήση μέσω


Troubleshooting a Remote WMI Connection

The following sections describe common issues developers may have with creating a remote WMI connection.

The following sections are discussed in this topic:

DCOM Access Denied

Symptom

your connection failed with the error "DCOM Access Denied", along with the decimal value -2147024891 or hex value0x80070005.

Issue

DCOM may not be configured to allow a WMI connection.

Resolution

You can configure DCOM settings for WMI using the DCOM Config utility (DCOMCnfg.exe) found in Administrative Tools in Control Panel. This utility exposes the settings that enable certain users to connect to the computer remotely through DCOM. Members of the Administrators group are allowed to remotely connect to the computer by default. With this utility you can set the security to start, access, and configure the WMI service.

For more information, see Securing a Remote WMI Connection.

Failure to Connect

Symptom

You cannot connect to WMI on a remote system.

Issue

You may be trying to connect to a system that does not support WMI. The following connections between operating system versions are not supported:

  • You cannot connect to a computer that is running a Starter, Basic, or Home edition.

Alternately, you may be trying to connect to a namespace which requires an encrypted connection, one that requires an authentication level of pktPrivacy, WbemAuthenticationLevelPktPrivacy, or RPC_C_AUTHN_LEVEL_PKT_PRIVACY.

Resolution

For more information, see Securing WMI Namespaces, Securing C++ Clients and Providers, or Setting the Default Process Security Level Using VBScript.

WMI Connection Timed Out

Symptom

Your WMI connection times out.

Issue

Due to network lag issues, the computer is simply not able to respond in time.

Resolution

When connecting to WMI through a call to SWbemLocator.ConnectServer or IWbemLocator::ConnectServer, you can set the wbemConnectFlagUseMaxWait flag (scripting) or the WBEM_FLAG_CONNECT_USE_MAX_WAITin C++ value to 128 (0x80) to impose a two (2) minute time-out on the call.

Connecting to WMI on a Remote Computer