4: Troubleshooting

This lesson explains | introduces | provides a detailed …

What You Will Learn

After completing this lesson, you will be able to:

·         Describe the basic WinRM dependencies required for operation

·         Troubleshoot communication problems

·         Gather required information for in depth analysis

Understanding Problem Sources

When WinRM is not functioning correctly the problem often breaks down into one of two areas: Communications and Permissions. Communications refers to any point between two systems including the systems themselves. Firewalls are a common example. Permission issues are identified as performing actions under credentials that do not have adequate rights, or the systems are not in an environment that matches the authentication method being used. Kerberos authentication, for example, will not succeed if there is no domain trust as communication mechanisms are not in place to verify permissions.

Communications

WinRM operations usually involve two systems. If either of these systems block or interrogate communications WinRM could be affected. Local system refers to a single system, but for the purpose of WinRM communications, it instead implies both local systems as both must pass the following tests.

DNS Resolution

Very commonly a customer's environment will have incorrect or missing DNS entries. Mulitple DNS suffixes can cause issues as well. Verify DNS resolution from System A to System B, and vice versa. Ping the NETBIOS name of the remote system and note both the IP address and FQDN returned. Ping the FQDN exactly as returned by the NETBIOS ping. This should resolve and should match the IP address of the NETBIOS ping. In most cases this is sufficient testing.

Listeners

WinRM communicates through http.sys, so anything using the same ports will cause a problem. This was more of an issue prior to WinRM 2.0 as ports 80 and 443 are commonly used. Check that no other processes are configured to listen on the same port as the System process, PID 4.

Netstat identifies processes using a port specified. In this example we filter on port 80. Other recommended ports to check are 443, 5985 and 5986. The first column is the local system, the second the remote system connecting, the connection status followed by the process ID (PID). The first column is the only one of interest as it represents what ports our local system is listening on. All zero's (0.0.0.0) means 'all interfaces.'

C:\>netstat -ano | find "80"

  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       4

  TCP    0.0.0.0:49152          0.0.0.0:0              LISTENING       680

  TCP    0.0.0.0:49155          0.0.0.0:0              LISTENING       180

  TCP    65.53.5.178:56456      65.53.63.31:80         ESTABLISHED     3580

  TCP    65.53.5.178:56457      65.53.63.31:80         ESTABLISHED     3580

Certificates

WinRM communicates through http.sys, so anything that is bound to http.sys using the same port as WinRM will cause a problem.

Antivirus and Antimalware

Until the last few years, most protection software did not monitor traffic protocols but instead the files arriving and leaving the system. Most vendors now include a form of protocol scanning that can disrupt WinRM sessions. When protection software is found to be running on a system and is suspected:

·         Open 'Programs and Features' in the Control Panel to identify all components installed. Perform an internet search of the exact product and release. Key words such as 'endpoint protection' and 'internet security' are clear indications of protocol scanning.

·         Temporarily disable all protection services and processes on both systems during testing

·         Disabling protection software, all services and startup items as listed in 'MSConfig', does not prevent filter drivers from loading and possibly continuing to impact communications.

·         Ask that software be removed if no other communication problems seem probable

·         Update all protection software (not just definitions) as vendors do identify problems and release updates to address them

Disconnected Networks

Systems that have multiple network cards (NICs) can contribute to communications issues, even if intermittently.

·         Control Panel> Network and Sharing Center> Change Adapter Settings

·         Disable any devices that show status 'Disconnected'

Firewalls

Enabling WinRM through 'winrm qc','Set-WSManQuickConfig' or 'Enable-PSRemoting' should open all necessary ports in the Windows firewall. If in doubt, run the commands again at any time.

If the Windows Firewall is disabled preventing the WinRM enablement process from completing, perform these manual commands.

1.       sc config "WinRM" start= auto

2.       net start WinRM

3.       winrm create winrm/config/listener?Address=*+Transport=HTTP

4.       netsh firewall add portopening TCP 5985 "Windows Remote Management"

Third party firewalls should be entirely disabled until testing is performed that rules them out.

Routers and Switches

Routers, especially Point to Point devices, generally connect networks and have sophisticated management options. It is very common for a customer to believe all ports are open for all protocols when in fact they are not. Switches can similarly be problematic at times as layer three switches learn MAC addresses. Consult a network engineer for assistance if in doubt.

Permissions

Generally, the user or computer account (Local System) performing a WinRM operation locally will be the one used for authentication and authorization on the remote system, unless credentials are explicitly provided.

Group Membership

Membership in the Local Administrators group on the remote system is usually sufficient to perform the actions requested by WinRM.

Group Policy

If permissions appear sufficient yet WinRM is still failing due to rights, run a resultant set of policy to determine if any specific policies are in place. A troubleshooting step is to move the systems into a new OU and block inheritance. Force group policy update or restart the systems following this move.

WinRM Group Policy Settings

·         Computer Configuration\Policies\Administrative Templates\Windows Components\Windows Remote Management (WinRM)

·         Computer Configuration\Policies\Administrative Templates\Windows Components\Windows Remote Shell

 

 

 

 

 

Test the Obvious

Despite the seemingly endless combination of WinRM settings and permissions that can be tested and verified, the first steps should be the simplest.

Without basic network communication and resolution, everything else is a waste of time. Over and again, SCVMM cases are resolved by testing what is overlooked and assumed healthy. When your car stalls on the highway you first check the fuel gauge, not call a mechanic. Make the same logical choice here.

Correct IP and DNS Resolution

Follow this test in the order presented. Once this has been performed from system A to B, do the same from system B to A. This verifies IP and DNS correctly.

1.       Ping the remote system NETBIOS name

2.       Ping the FQDN that is returned by the NETBIOS name ping

3.       Verify three items:

a.       NETBIOS ping returns an FQDN? If not, resolve DNS issues first.

Highlighted in Yellow.

b.       NETBIOS IP and FQDN IP addresses match.

Highlighted in Green.

c.       FQDN returned by NETBIOS ping matches 'ipconfig /all' output on remote system. Concatenate the 'Host Name' and 'Primary DNS Suffix' and compare.

Highlighted in Blue below.

4.       A reverse lookup of the IP address to verify that it resolves the correct system name is optional, but a good check.

Highlighted in Pink below.

C:\>ping cssvmmr2

 

Pinging cssvmmr2.northamerica.corp.microsoft.com [2001:4898:0:fff:200:5efe:65.53.5.62] with 32 bytes

 of data:

Reply from 2001:4898:0:fff:200:5efe:65.53.5.62: time=1ms

Reply from 2001:4898:0:fff:200:5efe:65.53.5.62: time<1ms

Reply from 2001:4898:0:fff:200:5efe:65.53.5.62: time<1ms

Reply from 2001:4898:0:fff:200:5efe:65.53.5.62: time<1ms

 

Ping statistics for 2001:4898:0:fff:200:5efe:65.53.5.62:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

    Minimum = 0ms, Maximum = 1ms, Average = 0ms

 

C:\>ping cssvmmr2.northamerica.corp.microsoft.com

 

Pinging cssvmmr2.northamerica.corp.microsoft.com [2001:4898:0:fff:200:5efe:65.53.5.62] with 32 bytes

 of data:

Reply from 2001:4898:0:fff:200:5efe:65.53.5.62: time=2ms

Reply from 2001:4898:0:fff:200:5efe:65.53.5.62: time<1ms

Reply from 2001:4898:0:fff:200:5efe:65.53.5.62: time<1ms

Reply from 2001:4898:0:fff:200:5efe:65.53.5.62: time<1ms

 

Ping statistics for 2001:4898:0:fff:200:5efe:65.53.5.62:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

    Minimum = 0ms, Maximum = 2ms, Average = 0ms

 

C:\>ping -a 65.53.5.62

 

Pinging CSSVMMR2 [65.53.5.62] with 32 bytes of data:

Reply from 65.53.5.62: bytes=32 time=2ms TTL=128

Reply from 65.53.5.62: bytes=32 time<1ms TTL=128

Reply from 65.53.5.62: bytes=32 time<1ms TTL=128

Reply from 65.53.5.62: bytes=32 time<1ms TTL=128

 

Ping statistics for 65.53.5.62:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

    Minimum = 0ms, Maximum = 2ms, Average = 0ms

 

Remote system 'ipconfig /all'

C:\>ipconfig /all

 

Windows IP Configuration

 

   Host Name . . . . . . . . . . . . : CSSVMMR2

   Primary Dns Suffix  . . . . . . . : northamerica.corp.microsoft.com

   Node Type . . . . . . . . . . . . : Hybrid

   IP Routing Enabled. . . . . . . . : No

   WINS Proxy Enabled. . . . . . . . : No

   DNS Suffix Search List. . . . . . : northamerica.corp.microsoft.com

                                       corp.microsoft.com

With the items above verified as correct, it's time to move on to the WinRM Ping Test.

 

WinRM Ping Test

Using the same idea for testing IP communications, we verify WinRM functionality. The most important point to keep in mind during this test is that it is two-way. If communications are not tested in both directions, the test is not conclusive. WinRM follows a client-server model and so each 'ping' direction tests a different component.


 

 Note:

It is assumed that both machines, A and B, are on the same domain and are running Windows 2008 R2. An elevated command prompt must be used.

 

Ping Test

This simple test confirms WinRM communications in the same way an IP 'ping' command does.

1.       From System A, ping System B. If this succeeds as below, one direction of communication has been verified.

C:\>winrm id -r:SystemB

IdentifyResponse

    ProtocolVersion = http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd

    ProductVendor = Microsoft Corporation

    ProductVersion = OS: 6.1.7600 SP: 0.0 Stack: 2.0

2.       From System B, ping System A. If this succeeds as below, both directions of communication have been verified.


 

 

Resolving a Failed Ping Test - Local Validation

The purpose of this exercise is to pinpoint the location of the problem. Possibilities are either of the communicating systems, or the communication path between them. This section verifies local settings.

Is the Local WinRM Service Responding?

Perform this test locally on both systems. This verifies local functionality.

1.       Verify basic loopback connectivity to WinRM service

2.       Output below indicates all is well. If there were a problem, perform 'winrm qc' then try again.

C:\>winrm id

IdentifyResponse

    ProtocolVersion = http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd

    ProductVendor = Microsoft Corporation

    ProductVersion = OS: 6.1.7600 SP: 0.0 Stack: 2.0

Are Local Listeners, Service, Client, and WinRS configured correctly?

Enumerate listeners and compare to default settings in the 'Working with WinRM' module.

winrm e winrm/config/listener

1.       If there are no listeners, restore settings then perform 'winrm qc' again. Listeners should then be listed.

C:\>winrm invoke Restore winrm/Config @{}

Restore_OUTPUT

C:\>winrm qc

2.       To enable the "compatibility" HTTP listener on port 80 for communicating with legacy WinRM 1.1 clients, perform:

winrm set winrm/config/service @{EnableCompatibilityHttpListener="true"}

3.       To enable the "compatibility" HTTPS listener on port 443: (this step is not required in most cases)

winrm set winrm/config/service @{EnableCompatibilityHttpsListener="true"}

 

Get configuration for Service, Client and WinRS. Compare to default settings in the 'Working with WinRM' module.

winrm g winrm/config

Resolving a Failed Ping Test - Remote Validation

The purpose of this exercise is to pinpoint the location of the problem. Possibilities are either of the communicating systems, or the communication path between them. This section verifies communication in two directions. This build on the tests already performed in the previous step, 'Resolving a Failed Ping Test - Local Validation.'

On System A, can WinRM information be pulled from System B?

C:\>winrm id -r:SystemB

IdentifyResponse

    ProtocolVersion = http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd

    ProductVendor = Microsoft Corporation

    ProductVersion = OS: 6.1.7600 SP: 0.0 Stack: 2.0

Output shows it can. If this failed, there will be an error along with a hex return code. Read the error, keeping it in mind as these possibilities are reviewed:

·         NETBIOS or DNS resolution failure.

·         Routing or network problems between systems.

·         Credentials used on local system are not authorized on the remote system.

·         Firewall settings on the remote system, B.

·         A Firewall on the network blocking communication by port or protocol (WinRM).

·         Listeners on remote system not configured (this should have been resolved in the previous section)

On System B, can WinRM information be pulled from System A?

C:\>winrm id -r:SystemA

IdentifyResponse

    ProtocolVersion = http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd

    ProductVendor = Microsoft Corporation

    ProductVersion = OS: 6.1.7600 SP: 0.0 Stack: 2.0

There are two possibilities. This succeeds or fails. This tells us a great bit.

Success - If this succeeded…

·         It is highly likely there is not a problem on the network affecting communications between systems.

·         It is true that the credentials used on System B to communicate with System A are valid and are authorized to connect.

o   Use these same credentials now when pulling data from System B on System A.

o   Also, make sure these credentials are in the local Administrators group on System B.

Failure - If this failed…

·         There may be problems on the network affecting communication.

·         Credentials used may not have permissions needed. Make sure the domain account logged in with is in the Administrators group on both systems

·         Verify that there are no GPOs enabled that configure WinRM

 

One Step Further… WMI

WinRM communication has been established at this point, but as most WinRM work is WMI related it a good idea to perform one further test.

System A: Can WinRM communicate with WMI locally?

C:\>winrm enum wmi/root/cimv2/Win32_ComputerSystem

Win32_ComputerSystem

    AdminPasswordStatus = 3

    AutomaticManagedPagefile = false

    AutomaticResetBootOption = true

    AutomaticResetCapability = true

    ...

Yes. If not, first step would be to click Start and begin typing 'wbemtest.' When this shows up in the Start Menu right click it and run as Administrator.

·         Click 'Connect…'

·         Click 'Open Class…'

·         Type 'win32_computersystem'

·         If class opens, success.

System A: Can WinRM communicate with WMI on System B?

C:\>winrm enum wmi/root/cimv2/Win32_ComputerSystem -r:SystemB

Win32_ComputerSystem

    AdminPasswordStatus = 3

    AutomaticManagedPagefile = false

    AutomaticResetBootOption = true

    AutomaticResetCapability = true

    ...

Yes. Now perform the same tests from System B to System A.

If communication failed:

·         Perform the same local winrm enumeration on System B

·         If this fails test WMI directly on System B with 'wbemtest'

Description: \\medialibrary\TCmedia\ProductionArt\IllustrationLibrary\PowerPoint\LightBulb.png Tip:

Test remote connectivity to the WinRM service with:

winrm get wmicimv2/Win32_Service?Name=WinRM -r:machinename

 

 

 

Finally, the SCVMM Agent

Using the 'Ping Test' remote WinRM and WMI communication was verified. As WinRM is used to communicate with the VMMAgent running on Hosts it is necessary to verify that this agent responds remotely.

Verify remote VMMAgent response.

winrm invoke GetVersion wmi/root/scvmm/AgentManagement -r:SystemB @{}

GetVersion_OUTPUT

    Version = 2.0.4275.0

    IsAmd64 = true

    ErrorInfo = null

    ReturnValue = 0

Success!

 

Listing of WMI Namespaces to Verify Remotely

Using the same methods as previously mentioned, the following namespaces are valuable tests to determine what WinRM can and cannot connect to remotely. If none can be connected to, there is likely a general WMI problem. If only a few fails, target those namespaces for WMI troubleshooting.

Perform all from an elevated command prompt. The commands below pull information from a remote system. To perform the same tests locally simply remove:

-r:<remoteserver>

Windows System

winrm wmi/root/cimv2/Win32_ComputerSystem -r:<remoteserver>

winrm wmi/root/cimv2/win32_OperatingSystem -r:<remoteserver>

winrm wmi/root/cimv2/Win32_PerfRawData_PerfOS_Memory -r:<remoteserver>

Failover Cluster

winrm wmi/root/mscluster/MSCluster_ClusterToNode -r:<remoteserver>

winrm wmi/root/mscluster/MSCluster_Cluster -r:<remoteserver>

winrm wmi/root/mscluster/MSCluster_ResourceGroup -r:<remoteserver>

winrm wmi/root/mscluster/MSCluster_ResourceGroupToResource -r:<remoteserver>

winrm wmi/root/mscluster/MSCluster_Service -r:<remoteserver>

winrm wmi/root/mscluster/MSCluster_ResourceToDisk -r:<remoteserver>

SCVMM Agent

winrm invoke GetVersion wmi/root/scvmm/AgentManagement -r:<remoteserver> @{}


 

 

Test Script

The commands above can be performed together using the script below. Execute from an elevated command prompt. If no system name is added following the name of the batch file you create, the local system will be tested. If a system name is added following the batch file name it will be treated as a remote system.

Example

Save the commands below to WinRM_WMI.cmd

At a command prompt type:

·         ' WinRM_WMI.cmd' and the local system will be tested.

·         'WinRM_WMI.cmd SystemA' and SystemA will be tested.

setlocal

If .%1 EQU . (set hostname=%computername%)&(set name=)&(Goto :Start)

Set hostname=%1

set name=-r:%1

 

:Start

echo . >%hostname%.txt

echo . >%hostname%.Error.txt

 

:Ping

echo ping %hostname% >>%hostname%.txt

echo ping %hostname% >>%hostname%.Error.txt

echo +++++++++++++++++++++++++++++++++++++++++++++  >>%hostname%.txt

echo +++++++++++++++++++++++++++++++++++++++++++++  >>%hostname%.Error.txt

ping %hostname% >>%hostname%.txt 2>>%hostname%.Error.txt

echo ================================================================= >>%hostname%.txt

echo ================================================================= >>%hostname%.Error.txt

 

:VMMAgent

echo winrm invoke GetVersion wmi/root/scvmm/AgentManagement %name% @{}  >>%hostname%.txt

echo winrm invoke GetVersion wmi/root/scvmm/AgentManagement %name% @{}  >>%hostname%.Error.txt

echo +++++++++++++++++++++++++++++++++++++++++++++  >>%hostname%.txt

echo +++++++++++++++++++++++++++++++++++++++++++++  >>%hostname%.Error.txt

call winrm invoke GetVersion wmi/root/scvmm/AgentManagement %name% @{} >>%hostname%.txt 2>>%hostname%.Error.txt

echo ================================================================= >>%hostname%.txt

echo ================================================================= >>%hostname%.Error.txt

 

:Cluster

:: SCVMM cluster information pulled

Call :WinRM wmi/root/mscluster/MSCluster_ClusterToNode

Call :WinRM wmi/root/mscluster/MSCluster_Cluster

Call :WinRM wmi/root/mscluster/MSCluster_ResourceGroup

Call :WinRM wmi/root/mscluster/MSCluster_ResourceGroupToResource

Call :WinRM wmi/root/mscluster/MSCluster_Service

:: During host refresh, for example

Call :WinRM wmi/root/mscluster/MSCluster_ResourceToDisk

 

:System

:: Initial system scan during P2V, for example

Call :WinRM wmi/root/cimv2/Win32_ComputerSystem

Call :WinRM wmi/root/cimv2/win32_OperatingSystem

:: Collects avail memory during host refresh, for example

Call :WinRM wmi/root/cimv2/Win32_PerfRawData_PerfOS_Memory

 

:End

exit /b

:: ----------

 

:WinRM

echo winrm enum %1 %name% >>%hostname%.txt

echo winrm enum %1 %name%>>%hostname%.Error.txt

echo +++++++++++++++++++++++++++++++++++++++++++++  >>%hostname%.txt

echo +++++++++++++++++++++++++++++++++++++++++++++  >>%hostname%.Error.txt

Call winrm enum %1 %name% >>%hostname%.txt 2>>%hostname%.Error.txt

echo ================================================================= >>%hostname%.txt

echo ================================================================= >>%hostname%.Error.txt

echo.  >>%hostname%.txt

echo.  >>%hostname%.Error.txt

Goto :eof

Identify the Problem

Depending on how WinRM is being used, there should be either output errors or event log entries to review. WinRM errors are typically specific and should point in the direction of the problem.

Console

If using a command prompt or PowerShell the error will output to the console.

C:\>winrm id -r:cssvmm-n1

WSManFault

    Message = The WinRM client cannot complete the operation within the time specified. Check if the

 machine name is valid and is reachable over the network and firewall exception for Windows Remote M

anagement service is enabled.

 

Error number:  -2144108250 0x80338126

The WinRM client cannot complete the operation within the time specified. Check if the machine name

is valid and is reachable over the network and firewall exception for Windows Remote Management serv

ice is enabled.

In the event that the remote system is using Compatibility Listeners only as it is running WinRM 1.1, specify port 80 with the 'http' designation.

C:\>winrm id -r:http://cssvmm-n1

This returned the same error, but could be relevant if the remote system is a Windows Vista or prior release.

The error above provides a great deal of information. Of most importance is the hex code returned. Although in the example above this return code is translated, it is not always. To figure out what a hex error means use the WinRM help function.

C:\>winrm helpmsg 0x80338126

The WinRM client cannot complete the operation within the time specified. Check if the machine name is valid and is reachable over the network and firewall exception for Windows Remote Management service is enabled.

 Important:

'winrm helpmsg' will not work if the eight digit hex code is not preceded by '0x'.

 

In the above example we cannot communicate with 'CSSVMM-N1'. Log into the remote system and starting with the basics determine what the problem is.

C:\>winrm id

IdentifyResponse

    ProtocolVersion = http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd

    ProductVendor = Microsoft Corporation

    ProductVersion = OS: 6.1.7600 SP: 0.0 Stack: 2.0

The WinRM service appears to be running. Check the rest of the settings now.

C:\>winrm get winrm/config

Config

    MaxEnvelopeSizekb = 150

    MaxTimeoutms = 60000

    MaxBatchItems = 32000

    MaxProviderRequests = 4294967295

    Client

        NetworkDelayms = 5000

        URLPrefix = wsman

        AllowUnencrypted = false

        Auth

            Basic = true

            Digest = true

            Kerberos = true

            Negotiate = true

            Certificate = true

            CredSSP = false

        DefaultPorts

            HTTP = 5985

            HTTPS = 5986

        TrustedHosts

    Service

        RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)S:P(AU;FA;GA;;;WD)(AU;SA;GWGX;;;WD)

        MaxConcurrentOperations = 4294967295

        MaxConcurrentOperationsPerUser = 15

        EnumerationTimeoutms = 60000

        MaxConnections = 25

        MaxPacketRetrievalTimeSeconds = 120

        AllowUnencrypted = false

        Auth

            Basic = false

            Kerberos = true

            Negotiate = true

            Certificate = false

            CredSSP = false

            CbtHardeningLevel = Relaxed

        DefaultPorts

            HTTP = 5985

            HTTPS = 5986

        IPv4Filter = *

        IPv6Filter = *

        EnableCompatibilityHttpListener = false

        EnableCompatibilityHttpsListener = false

        CertificateThumbprint

    Winrs

        AllowRemoteShellAccess = true

        IdleTimeout = 180000

        MaxConcurrentUsers = 5

        MaxShellRunTime = 2147483647

        MaxProcessesPerShell = 15

        MaxMemoryPerShellMB = 150

        MaxShellsPerUser = 5

 

 

C:\>winrm e winrm/config/listener

 

C:\>

Two items are relevant. First, if this system did require Compatibility Listeners, it no longer has them. The second command shows that there are in fact no listeners at all. WinRM cannot communicate this way. We easily correct this.

C:\>winrm set winrm/config/service @{EnableCompatibilityHttpListener="true"}

Service

    RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)S:P(AU;FA;GA;;;WD)(AU;SA;GWGX;;;WD)

    MaxConcurrentOperations = 4294967295

    MaxConcurrentOperationsPerUser = 15

    EnumerationTimeoutms = 60000

    MaxConnections = 25

    MaxPacketRetrievalTimeSeconds = 120

    AllowUnencrypted = false

    Auth

        Basic = false

        Kerberos = true

        Negotiate = true

        Certificate = false

        CredSSP = false

        CbtHardeningLevel = Relaxed

    DefaultPorts

        HTTP = 5985

        HTTPS = 5986

    IPv4Filter = *

    IPv6Filter = *

    EnableCompatibilityHttpListener = true

    EnableCompatibilityHttpsListener = false

    CertificateThumbprint

 

 

C:\>winrm qc

WinRM already is set up to receive requests on this machine.

WinRM is not set up to allow remote access to this machine for management.

The following changes must be made:

 

Create a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this machine.

 

Make these changes [y/n]? y

 

WinRM has been updated for remote management.

 

Created a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this machine.

Both remote connections now work again.

C:\>winrm id -r:cssvmm-n1

IdentifyResponse

    ProtocolVersion = http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd

    ProductVendor = Microsoft Corporation

    ProductVersion = OS: 6.1.7600 SP: 0.0 Stack: 2.0

 

 

C:\>winrm id -r:http://cssvmm-n1

IdentifyResponse

    ProtocolVersion = http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd

    ProductVendor = Microsoft Corporation

    ProductVersion = OS: 6.1.7600 SP: 0.0 Stack: 2.0


 

 

Event Logs

Most WinRM related events appear in the System or Application event logs. 'Service Control Manager' often contains the error as the WinRM service has terminated or restarted for some reason. These are often well known and have either been corrected by an update or hotfix, or documented in the KB. A few examples below.

Event Type: Error

Event Source: Service Control Manager

Event Category: None

Event ID: 7023

Date: 10/17/2010

Time: 6:45:56 PM

User: N/A

Computer: SystemB

Description:

The Windows Remote Management (WS-Management) service terminated with the following error:

Not all privileges referenced are assigned to the caller.

WinRM runs under the NETWORK SERVICE account, so in this case verify that all privileges the account should have are in place.

WinRM Event Log

WinRM has an event log under 'Event Viewer', though it is a bit hidden.

·         Open Event Viewer

·         Expand Windows Logs

·         Expand Applications and Services Logs

·         Expand Microsoft

·         Expand Windows

·         Expand Windows Remote Management

·         View the 'Operational' log

This event was thrown on the local system attempting to contact the remote system in the previous section.

Log Name:      Microsoft-Windows-WinRM/Operational

Source:        Microsoft-Windows-WinRM

Date:          1/1/2011 7:31:43 PM

Event ID:      168

Task Category: User authentication

Level:         Error

Keywords:      Security,Server

User:          NETWORK SERVICE

Computer:      CSSVMM-N1.Contoso.com

Description:

Sending HTTP 401 response to the client and disconnect the connection after sending the response

Event Logs

WinRM traces provide great detail of process activity. There many methods of collecting information. Common methods are examined here. Three types of WSMan provider logging are available in event logs: Operational, Analytic and Debug.

Operational

These are diagnostic messages, high level, and simple. The admin can see them using the EventViewer. To locate this event log:

·         Open Event Viewer in Server Manager

·         Open Applications and Services Logs

·         Open Microsoft

·         Scroll down to Windows Remote Management

Analytic and Debug

These are administrative trace messages. The ETW analytic channel is designed for events published in high volumes. These are used for logging administrative trace messages which will have to be later viewed using tracing tools/Event Viewer.

These event logs are located in the same location as 'Operational' events, but 'Show Analytic and Debug Logs' must be enabled from the 'View' menu.

Enable Analytic or Debug logging

Right click on the event log and select 'Enable Log.' Reproduce your issue, then right click again and select 'Disable Log.' Save all events to an .EVTX file then clear the log.

Description: C:\Users\jonjor\Documents\My Dropbox\WinRM Class\WinRM Traces\Analytic-Debug-Event.png

Analytic Logging Using Wevtutil

Use the following to show and enable the Analytic log by script. This can be opened in Event Viewer.

Begin logging.

wevtutil.exe sl Microsoft-Windows-Winrm/Analytic /e:true /q

Reproduce the issue. Then…

Disable logging.

wevtutil.exe sl Microsoft-Windows-Winrm/Analytic /e:false /q

Export the log.

wevtutil epl Microsoft-Windows-Winrm/Analytic C:\temp\winrm-analytic.evtx

Finally, clear the log.

wevtutil cl Microsoft-Windows-Winrm/Analytic

A file named 'winrm-analytic.evtx' will exist in the specified directory.

Description: \\medialibrary\TCmedia\ProductionArt\IllustrationLibrary\PowerPoint\LightBulb.png Tip:

Analytic and Debug logging are available in the same location as Operation logging in Event Viewer, but you will have to select 'View> Show Analytic and Debug Logs' from the menu to see them. Enable each by right clicking on them and selecting 'Enable Log'.

Traces

Traces generally gather data in a verbose manner and are viewable in text editors. Some traces must be converted from their native binary format to text prior to viewing.

WSManTrace

This is an extraordinarily simple method. This uses PowerShell and can be initiated on both machines to be traced prior to reproducing the issue. The resulting file will be unreadable, and must be converted.

Open an elevated PowerShell console and begin tracing.

Import-Module psdiagnostics

Enable-WSManTrace

Reproduce the issue. Then…

Disable tracing.

Disable-wsmantrace

Output will be available in %windir%\system32\wsmtraces.log.


 

 Note:

WSMan Trace Providers used by PowerShell are:

{04c6e16d-b99f-4a3a-9b3e-b8325bbc781e}

{c0a36be8-a515-4cfa-b2b6-2676366efff7}

{f1cab2c0-8beb-4fa2-90e1-8f17e0acdd5d}

{03992646-3dfe-4477-80e3-85936ace7abb}

{651d672b-e11f-41b7-add3-c2f6a4023672}

{D5C6A3E9-FA9C-434e-9653-165B4FC869E4}

{6e1b64d7-d3be-4651-90fb-3583af89d7f1}

{6FCDF39A-EF67-483D-A661-76D715C6B008}

 

Converting a Trace

In order to read the output collected in 'wsmtraces.log' above, perform these steps.

·         Go to http://logeater

·         Click 'Choose File' to upload the 'wsmtraces.log'

·         Click 'Submit'

·         Download the resulting 'wsmtraces_formatted.txt' or 'wsmtraces_formatted.csv' file depending on what you selected

This site is available internal to Microsoft only. There is no need to track down the correct TMF files to convert the trace as the entire process is automated for you.

Description: \\medialibrary\TCmedia\ProductionArt\IllustrationLibrary\PowerPoint\LightBulb.png Tip:

Logeater converts WPP traces other than WinRM. It's developers are open to submissions for new trace type conversions. Contact them for information.

 

Description: C:\Users\jonjor\Documents\My Dropbox\WinRM Class\WinRM Traces\wsmantraces-formatted-excerpt.txt.png

Logman

Logman can also be used to collect an ETW trace. This must be converted prior to viewing.

Begin logging.

logman.exe start winrmtrace -p Microsoft-Windows-Winrm -o winrmtrace.etl -ets

Reproduce the issue. Then…

Disable logging.

logman.exe stop winrmtrace -ets

A file named 'winrmtrace.etl' will exist in the current console directory.

 

WinRM Traces with Performance Monitor

Perform step ‘A. Configuration’ steps on all systems where WinRM trace information will be recorded. For SCVMM, this normally means the SCVMM Server and the Host(s) involved. Do not proceed to step ‘B. Reproduce Issue’ until this section is complete on all systems. This trace should be viewable using 'tracerpt.exe' as covered later.

 

A: Configuration

1.       Open Perfmon.msc and navigate to Event Trace Sessions. In your case you will run this from a non-core box and connect to the core box first.

2.       Right click Event Trace Sessions and choose New Data Collector Set.

Description: C:\Users\jonjor\AppData\Local\Temp\msohtmlclip1\02\clip_image001.png

 

3.       Name it WinRM, select “Create manually” and click Next

Description: C:\Users\jonjor\AppData\Local\Temp\msohtmlclip1\02\clip_image002.png

 

4.       Click “Add” when prompted “Which event trace providers would you like to enable?”

Description: C:\Users\jonjor\AppData\Local\Temp\msohtmlclip1\02\clip_image003.png

5.       Select “Windows Remote Management Trace”.

Description: C:\Users\jonjor\AppData\Local\Temp\msohtmlclip1\02\clip_image004.png

 

6.       Select the ‘Keywords(Any)’ Property and choose Edit.

Description: C:\Users\jonjor\AppData\Local\Temp\msohtmlclip1\02\clip_image005.png

7.       Select all Values and click OK.

Description: C:\Users\jonjor\AppData\Local\Temp\msohtmlclip1\02\clip_image006.png

 

8.       Select the ‘Level’ Property and choose Edit.

Description: C:\Users\jonjor\AppData\Local\Temp\msohtmlclip1\02\clip_image007.png

9.       Select the Manual option, change the value to 0x05, and click OK.

Description: C:\Users\jonjor\AppData\Local\Temp\msohtmlclip1\02\clip_image008.png

 

10.   Click Next.

Description: C:\Users\jonjor\AppData\Local\Temp\msohtmlclip1\02\clip_image009.png

11.   Change the ‘Root Directory’ from ‘%LOCALAPPDATA%\’ to the location you would like to save the log. Then click Next.

Description: C:\Users\jonjor\AppData\Local\Temp\msohtmlclip1\02\clip_image010.png

 

12.   Leave ‘Save and close’ selected and click Finish

Description: C:\Users\jonjor\AppData\Local\Temp\msohtmlclip1\02\clip_image011.png

 B: Reproduce Issue

Perform the following steps on all systems you wish to trace WinRM. For SCVMM, that normally means the SCVMM Server and Host(s).

 

1.       Start the trace by right clicking on the new Data Collector, ‘WinRM’ and select Start (on all systems you configured). A ‘Running’ icon will appear on the WinRM data collector.

 

Description: C:\Users\jonjor\AppData\Local\Temp\msohtmlclip1\02\clip_image012.png

 

2.       Reproduce the issue now. Once the issue has been reproduced, continue to the next step.

3.       Stop the trace by right clicking the WinRM data collector and selecting Stop on both systems.

4.       You will now have a file named ‘winrm.etl’ saved to the location you specified in the configuration section. 

 

ETW File Conversion

To convert the ETL logs to various formats perform any of the following.

·         XML

tracerpt.exe winrmtrace.etl -of XML -o winrmtrace.xml

·         CSV

tracerpt.exe winrmtrace.etl -of CSV -o winrmtrace.csv

·         TXT

netsh trace convert winrmtrace.etl dump=TXT

 

Scripts to Convert WinRM .ETL Files

If you prefer to convert traces without LogEater, the scripts below can be used. They do not require access to TMFs beyond referencing them. Scripts provided courtesy of Tony Gaston.

Decode Windows 2008 R2 and Windows 7:

@IF "%_ECHO%" == "" ECHO OFF

 

REM

REM Batch file to decode ETL trace logs

REM execute with file name to decode, can be ran remotely from my sharepoint

REM Written by TonyGa

REM

 

 

IF {%1} == {} GOTO USAGE

IF {%BRIEF%} == {} GOTO VERBOSE

 

REM User requested brief output,

\\cpr-web\cprnt\tools\Tracing\Tools\%processor_architecture%\tracefmt.exe %1 -p \\cpr-web\cprnt\tools\Tracing\TMF\Windows2008R2-Win7 -o %1-formatted.log

 

GOTO END

 

:VERBOSE

@setlocal DISABLEDELAYEDEXPANSION

REM

REM Format string below translates to

REM [CPUNumber]ProcessID.ThreadID::SystemTime [MessageGUIDFriendlyName](ComponentName:FunctionName:Filename_LineNumber)

REM

SET TRACE_FORMAT_PREFIX= [%%9!d!] %%8!04X!.%%3!04X!::%%4!s! [%%1!s!](%%!COMPNAME!:%%!FUNC!:%%2!s!)

@setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION

 

\\cpr-web\cprnt\tools\Tracing\Tools\%processor_architecture%\tracefmt.exe %1 -p \\cpr-web\cprnt\tools\Tracing\TMF\Windows2008R2-Win7 -o %1-formatted.log

 

GOTO END

 

:USAGE

ECHO.

ECHO. Missing file name

ECHO.

ECHO A script to decode ETL trace logs

ECHO.

ECHO Usage: %~nx0 FileName_To_Decode

ECHO.

echo To switch to default output sent the environment variable below

ECHO SET BRIEF=1

 

GOTO END

 

:END

 

Decode Windows 2008 and Windows Vista:

@IF "%_ECHO%" == "" ECHO OFF

 

REM

REM Batch file to decode ETL trace logs

REM execute with file name to decode, can be ran remotely from my sharepoint

REM Written by TonyGa

REM

 

 

IF {%1} == {} GOTO USAGE

IF {%BRIEF%} == {} GOTO VERBOSE

 

REM User requested brief output,

\\cpr-web\cprnt\tools\Tracing\Tools\%processor_architecture%\tracefmt.exe %1 -p \\cpr-web\cprnt\tools\Tracing\TMF\Windows2008-Vista -o %1-formatted.log

 

GOTO END

 

:VERBOSE

@setlocal DISABLEDELAYEDEXPANSION

REM

REM Format string below translates to

REM [CPUNumber]ProcessID.ThreadID::SystemTime [MessageGUIDFriendlyName](ComponentName:FunctionName:Filename_LineNumber)

REM

SET TRACE_FORMAT_PREFIX= [%%9!d!] %%8!04X!.%%3!04X!::%%4!s! [%%1!s!](%%!COMPNAME!:%%!FUNC!:%%2!s!)

@setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION

 

\\cpr-web\cprnt\tools\Tracing\Tools\%processor_architecture%\tracefmt.exe %1 -p \\cpr-web\cprnt\tools\Tracing\TMF\Windows2008-Vista -o %1-formatted.log

 

GOTO END

 

:USAGE

ECHO.

ECHO. Missing file name

ECHO.

ECHO A script to decode ETL trace logs

ECHO.

ECHO Usage: %~nx0 FileName_To_Decode

ECHO.

echo To switch to default output sent the environment variable below

ECHO SET BRIEF=1

 

GOTO END

 

:END

 

Decode Windows 2008 and Windows Vista:

@IF "%_ECHO%" == "" ECHO OFF

 

REM

REM Batch file to decode ETL trace logs

REM execute with file name to decode, can be ran remotely from my sharepoint

REM Written by TonyGa

REM

 

 

IF {%1} == {} GOTO USAGE

IF {%BRIEF%} == {} GOTO VERBOSE

 

REM User requested brief output,

\\cpr-web\cprnt\tools\Tracing\Tools\%processor_architecture%\tracefmt.exe  %1 -p \\cpr-web\cprnt\tools\Tracing\TMF\Windows2003 -o %1-formatted.log

 

GOTO END

 

:VERBOSE

@setlocal DISABLEDELAYEDEXPANSION

REM

REM Format string below translates to

REM [CPUNumber]ProcessID.ThreadID::SystemTime [MessageGUIDFriendlyName](ComponentName:FunctionName:Filename_LineNumber)

REM

SET TRACE_FORMAT_PREFIX= [%%9!d!] %%8!04X!.%%3!04X!::%%4!s! [%%1!s!](%%!COMPNAME!:%%!FUNC!:%%2!s!)

@setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION

 

\\cpr-web\cprnt\tools\Tracing\Tools\%processor_architecture%\tracefmt.exe  %1 -p \\cpr-web\cprnt\tools\Tracing\TMF\Windows2003 -o %1-formatted.log

 

GOTO END

 

:USAGE

ECHO.

ECHO. Missing file name

ECHO.

ECHO A script to decode ETL trace logs

ECHO.

ECHO Usage: %~nx0 FileName_To_Decode

ECHO.

echo To switch to default output sent the environment variable below

ECHO SET BRIEF=1

 

 

GOTO END

 

 

:END

 


 

 Note:

Required GUIDs are available online, on MSDN and Cheng's blog:

http://blogs.technet.com/b/chengw/archive/2008/08/28/how-to-collect-winrm-traces.aspx

 


 

 Note:

Required TMF files are available on various shares (see GES), also located here:

\\ncscs\Tools\SCVMM\TMF_Files

 

 

SCVMM Traces

ETL traces are collected to examine exactly what transpires in SCVMM and related technologies. As WinRM is the technology used to communicate control data between SCVMM Server and Hosts, WSMAN entries make up a good bit of the trace commands.

Understanding the WinRM calls made, and being able to reproduce these calls from an elevated command prompt is an important troubleshooting skill. This allows immediate testing of commands run just prior to, and on the same thread, as exceptions thrown.

Below is an example trace that is followed by the WinRM commands that would be performed to emulate the same calls.

GREEN entries are the initiating PowerShell commands from VMMService

CRIMSON entries contain WinRM [ENUMERATE] calls

BLUE entries contain Exceptions

GOLD entries are messages

 

5086 00005084    132.19062805    [6096] 17D0.0744::01/28-18:29:22.378#18:MonadUtils.cs(293): Cmdlet Refresh-VM:

5164 00005162    132.24555969    [4608] 1200.0A10::01/28-18:29:22.425#04:WsmanAPIWrapper.cs(1163): WSMAN: URL: [http://server.contoso.com:80] Verb: [ENUMERATE],  resource: [http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/Msvm_ComputerSystem], wqlQuery: []

5178 00005176    132.30389404    [4608] 1200.0A10::01/28-18:29:22.488#04:WsmanAPIWrapper.cs(1163): WSMAN: URL: [http://server.contoso.com:80] Verb: [ENUMERATE],  resource: [http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/*], wqlQuery: [select * from Msvm_MemorySettingData where InstanceID like "Microsoft:7E2BD20C-581F-4C6D-AFAA-A4D64B1221C0%" and ResourceType=4]

5180 00005178    132.31896973    [4608] 1200.0A10::01/28-18:29:22.503#04:WsmanAPIWrapper.cs(1163): WSMAN: URL: [http://server.contoso.com:80] Verb: [ENUMERATE],  resource: [http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/Msvm_PreviousSettingData], wqlQuery: []

5182 00005180    132.32810974    [4608] 1200.0A10::01/28-18:29:22.503#04:WsmanAPIWrapper.cs(1163): WSMAN: URL: [http://server.contoso.com:80] Verb: [ENUMERATE],  resource: [http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/Msvm_ResourceAllocationSettingData], wqlQuery: []

5190 00005188    132.49446106    [4608] 1200.0A10::01/28-18:29:22.675#04:WsmanAPIWrapper.cs(1163): WSMAN: URL: [http://server.contoso.com:80] Verb: [ENUMERATE],  resource: [http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_Volume], wqlQuery: []

…

5262 00005260    132.66345215    [4608] 1200.0A10::01/28-18:29:22.831#26:VmRefresher.cs(4876): VM V-MBX1 has an invalid bus specification or bad path or path that we cannot access and will be marked unsupported

5263 00005261    132.66349792    [4608] 1200.0A10::01/28-18:29:22.831#26:VmRefresher.cs(4876): Microsoft.VirtualManager.Engine.WorkloadCreation.DriveSlotIsBusy: Another device is already at the location (SCSI, 0, 0).

5264 00005262    132.66349792    [4608] Select another destination for the disk, and then try the operation again.

5265 00005263    132.66349792    [4608]    at Microsoft.VirtualManager.Engine.ImageLibrary.VM.CheckForBindingViolations(IList`1 vddList, IList`1 dvdList, IList`1 scsiList)

5266 00005264    132.66349792    [4608]    at Microsoft.VirtualManager.Engine.WorkloadCreation.VirtualDiskDrive.SetAdapterBinding(VHDBusType busType, Byte bus, Byte lun, Boolean checkForBindingViolations)

5267 00005265    132.66349792    [4608]    at Microsoft.VirtualManager.Engine.WorkloadCreation.VirtualDiskDrive.SetAdapterBinding(VHDBusType busType, Byte bus, Byte lun)

5268 00005266    132.66349792    [4608]    at Microsoft.VirtualManager.Engine.Backup.DifferencingDisksRefresher.RemoveOrUpdatePassThruDisksInDB(ImgLibCatalog imgLibCatalog, CommonVMBase vmBase)

5269 00005267    132.66349792    [4608]    at Microsoft.VirtualManager.Engine.Backup.DifferencingDisksRefresher.UpdateObjectsAndRelationsInDB(Guid taskID, CommonVMBase vmBase, List`1 vhdList, ImgLibCatalog imgLibCatalog)

5270 00005268    132.66349792    [4608]    at Microsoft.VirtualManager.Engine.Backup.DifferencingDisksRefresher.UpdateDB(Guid taskID, CommonVMBase vmBase)

5271 00005269    132.66349792    [4608]    at Microsoft.VirtualManager.Engine.BitBos.VMRefresherBase.UpdateDisks(IVMComputerSystem vmComputer)

5272 00005270    132.66349792    [4608] *** Carmine error was: BusSlotIsBusy (659); 0

5273 00005271    132.66349792    [4608] *** V-MBX1 ** SCSI ** 0 ** 0 **

 

WSMAN command translation

Line 5262 contains the error. Moving up in the trace along the same Process ID (PID) and Thread ID (TID), the most recent WinRM command called is on line 5190. This entry, being the last command executed prior to the exception, is likely related to the error. We will turn this into a command that can be called from an elevated command prompt on the SCVMM Server.

5190 00005188    132.49446106    [4608] 1200.0A10::01/28-18:29:22.675#04:WsmanAPIWrapper.cs(1163): WSMAN: URL: [http://server.contoso.com:80] Verb: [ENUMERATE],  resource: [http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_Volume], wqlQuery: []

 

This entry breaks down into a few components.

WSMAN: URL: [http://server.contoso.com:80] Verb: [ENUMERATE],  resource: [http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_Volume], wqlQuery: []

 

Target system:

http://server.contoso.com:80

 

WMI Namespace:

http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_Volume

 

Verb action:

Verb: [ENUMERATE]

 

Create URI from this information. Start at the wmi/.

winrm enum wmi/root/cimv2/Win32_Volume

To initiate this command on a remote system simply add -r:<servername>

winrm enum wmi/root/cimv2/Win32_Volume -r:server

The output from this will fill a few pages. If this data can be pulled, examine it. If the command pulls nothing, or produces an error, examine it more thoroughly.

 

Common Issues

This section addresses specific problems that are encountered on a regular basis in relation to SCVMM. System Center Virtual Machine Manager heavily utilizes WinRM for Control Data (communications) between the SCVMM server and Hosts it manages. This is not true of performing Physical to Virtual (P2V) conversions or interaction with VMware.

Errors in SCVMM appear in the Admin Console as a general error number, followed by a problem description, a possible workaround, and a resulting hex code. The general error number is specific to the product and is useful for reference. More important is the hex code. A sample return code might be '0x803381A6.' Simply deciphering this code often points to proper corrective actions.

Return Code 0x803381A6

An HResult of 0x803381A6 is very specific and directly applies here. Excerpts of SCVMM data are provided to illustrate the type of information available and steps taken to remedy the issue.

First, what does 0x803381A6 mean?

C:\>winrm helpmsg 0x803381A6

The WS-Management service cannot process the request. The maximum number of concurrent operations for this user has been exceeded. Close existing operations for this user, or raise the quota for this user.

Clearly, the maximum number of concurrent connections has been exceeded. Simple enough. Let's look at the trace as well.

SCVMM Trace Example

47233,14:26:14.297 07-01-2010,0x0890,0x0484,26,VmRefresher.cs,901,0x00000000,Failure in getting the vm service and the vms on that host vmserver.contoso.com,{00000000-0000-0000-0000-000000000000},1,

…

47234,14:26:14.298 07-01-2010,0x0890,0x0484,26,VmRefresher.cs,901,0x00000000,"Microsoft.Carmine.WSManWrappers.WSManProviderException: A Hardware Management error has occurred trying to contact server vmserver.contoso.com.

Check that WinRM is installed and running on server vmserver.contoso.com. For more information use the command ""winrm helpmsg hresult"". ---> System.Runtime.InteropServices.COMException (0x803381A6): The WS-Management service cannot process the request. The maximum number of concurrent operations for this user has been exceeded. Close existing operations for this user; or raise the quota for this user.

…

47984,14:26:25.356 07-01-2010,0x0890,0x10E4,19,Task.cs,246,0x00000000,"Task failed error HostAgentWSManError (2927); HR: 0x803381A6 with exception Microsoft.Carmine.WSManWrappers.WSManProviderException: A Hardware Management error has occurred trying to contact server vmserver.contoso.com.

Troubleshooting 0x803381A6

Step 1

On each server open 'services.msc' and stop, not restart, WinRM (Windows Remote Management). This should take a few seconds. If it takes 30 seconds or more follow the steps below. Otherwise, start WinRM again and move to ‘Step 2’.

From an elevated command prompt type the command below. Note the space after the "=".

sc config winrm type= own

Start the WinRM service after running this command.

This change will take effect after a Host server restart. Perform a restart when possible.


 

 Note:

Placing the WinRM process in its own SvcHost is required due to a problem in Windows where the NLA process that is also in the same SvcHost creates a deadlock condition under certain circumstances.

 

Step 2

On each server open an elevated command prompt to perform the following steps.

Windows 2008R2 AND Windows 2008 SP2 machines. Use the following command to increase the default value for WinRM timeout.

winrm set winrm/config @{MaxTimeoutms = "1800000"}

Windows 2008R2 AND Windows 2008 SP2 machines. (Windows 2008 R2 servers may report not needing this step)

winrm set winrm/config/Service @{MaxConcurrentOperations="200"}

Windows 2008R2 AND Windows 2008 SP2 machines. (Windows 2008 SP2 servers may report not needing this step)

winrm set winrm/config/Service @{MaxConcurrentOperationsPerUser="400"}

Windows 2008R2 AND Windows 2008 SP2 machines:

net stop winrm

net start winrm

net start vmmagent

 

 

Appendix A: Glossary

wsman:Items

A WS-Management protocol element returned in an enumeration that obtains both the instances and the instance EPRs. wsman:Items is a container that holds an instance and its EPR. This type of enumeration is initiated when the WSManFlagReturnObjectAndEPR flag is set in the request.

B

baseboard management controller (BMC)

A microcontroller attached locally to a server. BMCs have sensors that monitor the physical state of the server and a separate network connection that can communicate over the network, even if the server is offline. You have access to BMC data through the Intelligent Platform Management Interface (IPMI) WMI provider.

basic authentication

The user name and password sent in the authentication exchange. Basic authentication can be configured to use either HTTP or HTTPS transport in a domain or workgroup. This method is the least secure method of authentication.

BMC

See baseboard management controller (BMC).

C

CIM

See Common Information Model (CIM).

client

The client application using the WS-Management protocol to access the management service on either the local or a remote computer.

Common Information Model (CIM)

The Distributed Management Task Force (DMTF) model that describes how to represent real-world computer and network objects. CIM uses an object-oriented paradigm, where managed objects are modeled using the concepts of classes and instances.

D

digest authentication

An exchange wherein the server receives a request from a client and sends data about the client to an authenticating server, typically a domain controller. If the client is authenticated, then the server receives a Digest session key used to authenticate subsequent requests from the client.

Distributed Management Task Force (DMTF)

The industry organization developing management standards and integration technology for enterprise and Internet environments.

DMTF

See Distributed Management Task Force (DMTF).

E

endpoint

A resource that can be addressed by an endpoint reference (EPR).

endpoint reference (EPR)

A combination of WS-Addressing and WS-Management addressing elements that together describe an address for a resource in the message SOAP header. This is a Web service term.

enumeration

A set, or collection, of resource instances or the action of requesting such a set. In WS-Management protocol, WS-Enumeration is used to obtain the collection. In the WinRM service scripting implementation of enumeration, Session.Enumerate and the Enumerator object are used. The corresponding C++ method and interface are IWSManSession::Enumerate and IWSManEnumerator.

EPR

See endpoint reference (EPR).

Event Collection Service

The operating system component that receives events from the BMC and other operating system components or applications.

event forwarding

A notification of events that occur on remote computers can be sent to subscribing applications. Event forwarding is not a feature of WinRM, but of the Windows Event Log. Event forwarding becomes available for the first time in Windows Vista. The Management applications, such as Microsoft Operations Manager (MOM) use event forwarding.

F

filter

A query mechanism for specifying a limited set of instances in the request for a resource. You can specify a filter parameter on calls to Session.Enumerate or IWSManSession::Enumerate.

filter dialect

An XML string that identifies the XML dialect used to specify a filter in a call to Session.Enumerate or IWSManSession::Enumerate. The WinRM service supports WQL as a filter dialect when receiving requests.

fragment

An XML string that identifies part of an instance of a resource rather than the entire resource. Fragment support is found in the ResourceLocator object.

fragment dialect

An XML string that identifies the XML dialect used to specify a fragment. Fragment support is found in the ResourceLocator object. The WinRM service supports XPath for fragment dialect when receiving requests.

I

in-band

The client application obtains BMC data through the WinRM listener in the operating system.

Intelligent Platform Management Interface (IPMI)

An IT industry standard for the architecture of baseboard management controller (BMC). The Windows hardware management features supply an IPMI driver and a WMI IPMI provider that allow management scripts, command-line tools, and applications to obtain BMC data. The IPMI provider has WMI classes.

IPMI

See Intelligent Platform Management Interface (IMPI).

IPMI driver

The kernel driver that enables access to baseboard management controller (BMC) devices from the operating system components.

IPMI provider

A standard WMI provider that defines classes modeling the IPMI and its data. The IPMI provider is a COM DLL that obtains data from the BMC.

K

KCS

See Keyboard Controller Style (KCS).

Kerberos authentication

A method of mutual authentication between the client and server that uses encrypted keys. For computers running on a Windows-based operating system, the client account must be a domain account in the same domain as the server. When a client uses default credentials, Kerberos is the authentication method if the connection string is not one of the following: localhost, 127.0.0.1, or [::1].

Keyboard Controller Style (KCS)

The protocol used by the IPMI driver to communicate with the baseboard management controller (BMC).

L

listener

A management service that implements WS-Management protocol to send and receive messages. WinRM is a listener service. A listener is defined by a transport (HTTP or HTTPS) and an IPv4 or IPv6 address. You can create more than one WinRM listener instance on a single computer by giving them a different TCP/IP address or port number.

M

message

A package of information transmitted between computers or separate networks constructed with the SOAP protocol. The package has a header, that describes the message target and transport, and a body that contains the content to be used when the message arrives. A message is a combination of elements from specifications such as WS-Addressing, WS-Transfer, and WS-Management.

N

namespace

A WMI namespace, which is a logical grouping of WMI classes and instances to control scope and access. The most frequent source of management data for systems running Windows is the root\cimv2 namespace, which contains classes such as Win32_Process. Namespaces appear in the resource URI for WMI classes, for example http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_Service.

negotiate authentication

A negotiated, single sign on type of authentication that is the Windows implementation of Simple and Protected GSSAPI Negotiation Mechanism (SPNEGO). SPNEGO negotiation determines whether authentication is handled by Kerberos or NTLM. Kerberos is the preferred mechanism. Negotiate authentication on Windows-based systems is also called Windows Integrated Authentication.

numeric sensor

A numeric type of sensor in a baseboard management controller (BMC), for example temperature or voltage.

O

option

The additional data required by the resource provider to process a request. For example, some WMI providers require additional data supplied as IWbemContext or SWbemNamedValueSet objects. Option support is found in the ResourceLocator object.

out-of-band

The client application obtains data directly from the baseboard management controller (BMC) of another computer, rather than through the WinRM listener in the operating system.

P

pull

A WS-Enumeration pull message is sent to continue an enumeration started by an initial call to WS-Enumeration:Enumerate. The pull operation in the WinRM service is performed by Enumerator.ReadItem or IWSManEnumerator::ReadItem.

R

resource

An endpoint that represents a distinct type of management operation or value. A service exposes one or more resources and some resources can have more than one instance. A management resource is similar to a WMI class or a database table, and an instance is similar to an instance of the class or a row in the table. For example, the Win32_LogicalDisk class represents a resource. Win32_LogicalDisk="C:\" is a specific instance of the resource.

resource URI

The uniform resource identifier (URI) used to identify a specific type of resource, such as disks or processes, on a system.

S

SEL

See System Event Log (SEL).

SEL adapter

The adapter that sends baseboard management controller (BMC) data to the Event Collector.

selector

A name and value pair that represents a particular instance of a resource. This is essentially a filter or "key" that identifies the desired instance of the resource. Selector support is found in the ResourceLocator object.

sensor

A measurement device in a baseboard management controller (BMC).

service

An application that provides management services to clients through the WS-Management protocol and other Web services. A service is usually the same as the listener on a network. The service has a physical transport address.

session

A connection between a Windows Remote Management client and the local or remote WinRM listener, or service. This connection is similar to the connection between a WMI client script and WMI on a remote server. The session operations, such as enumerating a resource (Enumerate), getting an instance of a resource (Get), or running a resource method (Invoke) are methods of the Session object. A Session object is created by WSMan.CreateSession.

Simple and Protected GSS-API Negotiation Mechanism (SPNEGO)

An authentication mechanism used by the client or server receiving requests for data through the WinRM in an Active Directory context. SPNEGO is based on an Request For Comments (RFC) protocol produced by the Internet Engineering Task Force (IETF). SPNEGO is also known as Windows Integrated Authentication, the term used in the Windows Remote Management help topics.

Simple Object Access Protocol (SOAP)

An XML-based protocol used by Web services.

SOAP

See Simple Object Access Protocol (SOAP).

SPNEGO

See Simple and Protected GSS-API Negotiation Mechanism (SPNEGO).

System Event Log (SEL)

The database of events in the baseboard management controller (BMC) hardware. The SEL adapter conveys these events to the operating system.

U

uniform resource identifier (URI)

A string that identifies a resource in the enterprise, such as a computer, a process, a disk drive, or a temperature sensor in a baseboard management controller (BMC). The URI is the Web service addressing mechanism defined in Internet Engineering Task Force (IETF) Uniform Resource Identifier (URI): Generic Syntax [RFC3986].

URI

See uniform resource identifier (URI).

W

Web service

A software application used for interaction between computers across the Internet or a network. Web services are described by the Web Service Description Language (WSDL). The specific description of the Web service tells other services how to interact with the Web service using SOAP messages. The messages are conveyed between computers by a transport, typically HTTP or HTTPS. WS-Addressing, WS-Eventing, and WS-Management are examples of protocols used by Web service applications to communicate with each other.

Web Service Description Language (WSDL)

An XML-based language used to define how to interact with a Web service. Typically, the WSDL describes what SOAP messages the Web service requires to return data or carry out operations. The WSDL allows an implementation from one operating system to communicate with the Web service implemented on another operating system, as long as the requirements of the WSDL are met.

Windows Integrated Authentication

See negotiate.

Windows Management Instrumentation (WMI)

The Microsoft implementation of the Web-Based Enterprise Management (WBEM) standard published by the Distributed Management Task Force (DMTF). WMI allows you to manage local and remote computers and models computer and network objects using an extension of the Common Information Model (CIM) standard.

Windows Remote Management (WinRM)

The Microsoft implementation of a management Web service based on the public standard WS-Management protocol.

Windows Remote Shell (WinRS)

A shell tool that relies on WinRM to execute remote commands, especially for headless servers. The command-line tool is Winrs.

WMI

See Windows Management Instrumentation (WMI).

WMI plug-in

The WinRM plug-in that makes WMI data available to WinRM clients.

WS-Addressing (wsa)

A public standard protocol, which is SOAP-based, that creates an addressing system used in the headers of messages sent across the Internet. The standard defines how resources can be located across networks and firewalls. WS-Addressing is one of the Web service protocols which compose the WS-Management protocol.

WS-Enumeration (wsen)

A public standard protocol, which is SOAP-based, for enumerating a sequence of XML elements that may represent data collections, logs, or other linear information structures. WS-Enumeration is one of the Web service protocols which compose the WS-Management protocol.

WS-Eventing (wse)

A public standard protocol, which is SOAP-based, that allows one Web service (the subscriber) to subscribe to and accept event notification messages from another Web service (the event source). WS-Eventing is one of the Web service protocols which compose the WS-Management protocol.

WS-Management

A public standard protocol, which is SOAP-based, for sharing management data among all operating systems, computers, and devices. All messages sent by the WinRM client or server components use this protocol.

WS-Transfer (wxf)

A public standard protocol, which is SOAP-based, for accessing XML representations of Web service-based resources through a simple set of verbs such as Get, Put, Invoke, or Delete. WS-Transfer defines operations for sending and receiving the representation of a particular resource and operations for creating or deleting a resource and its corresponding representation.

X

XPath

A path notation for addressing parts of an XML document, similar to a URL. An XPath expression is a sequence of phrases to get from the current location in the XML document to another node or set of nodes. The phrases are separated by forward-slash ("/") characters. The WinRM service supports XPath for fragment dialect.

 

Source: http://msdn.microsoft.com/en-us/library/aa384465(v=VS.85).aspx

 

 

Appendix B: Details on secure port configuration for WS-Management in Windows 7 and Windows Server 2008 R2

Details on secure port configuration for WS-Management in Windows 7 and Windows Server 2008 R2

http://technet.microsoft.com/en-us/library/ee922665(WS.10).aspx

Updated: December 30, 2009

Applies To: Windows Server 2008 R2

This article provides some important details on secure port configuration for WS-Management in WinRM 2.0, which is included in Windows 7 and Windows Server 2008 R2. WinRM can be downloaded separately as part of the Windows Management Framework for Windows XP, Windows Server 2003, Windows Vista, and Windows Server 2008.

Secure port configuration details

1.       Summary

2.       Functional behavior

a.       New default values

b.       Compatibility listeners

c.       Listener migration

d.       PowerShell-specific changes

e.       WinRM-specific changes

f.        Working in mixed environments

g.       Firewall rules

h.       Event forwarding

Summary

Servers connected to the internet are typically configured to allow traffic from many different users who warrant various levels of trust. Exposing a management interface over traditional ports potentially exposes important system-altering capabilities to malicious users. For this reason, it is more secure to expose a management interface through a port that does not handle web traffic.

In order to provide more secure default configuration, and in order to lessen the likelihood that a user will unknowingly create a WS-Management listener on these common ports, the default configuration was changed in WinRM 2.0 to a different set of ports. When upgrading to WinRM 2.0, any listener that exists on port 80 or 443 will automatically be migrated to the new default ports of 5985 for HTTP and 5986 for HTTPS.

Functional behavior

New default values

The default ports used when creating new WS-Management listeners will be changed from 80 for HTTP and 443 for HTTPS to 5985 for HTTP and 5986 for HTTPS.  Any listeners created manually without specifying a port, or listeners created using quick config, will listen on these new ports. Similarly, the default ports used when issuing requests from the client will also be changed to the new ports.  Any client requests sent out without specifying a port will be sent to these new ports.

 Important:

If the default client ports are set to something other than 80/443, they will not be modified.

 

Compatibility listeners

In order to aid interoperability with computers that have not been upgraded, new configuration settings have been introduced to create compatibility listeners on ports 80 and 443 for HTTP and HTTPS, respectively. These settings can be enabled directly through the WinRM configuration console command line call as follows.

·         winrm set winrm/config/service @{EnableCompatibilityHttpListener="true"}

·         winrm set winrm/config/service @{EnableCompatibilityHttpsListener="true"}

The compatibility listeners can also be enabled via Group Policy using the new settings under Computer Configuration/Administrative Templates/Windows Components/Windows Remote Management (WinRM)/WinRM Service.

These compatibility listeners are not directly addressable, meaning they cannot be retrieved via winrm get and their settings cannot be modified. When enumerated, these listeners will be tagged with the string Source=”Compatibility” in order to identify them, as in the following example.

C:\Windows\system32>winrm e winrm/config/listener

 

Listener

    Address = *

    Transport = HTTP

    Port = 5985

    Hostname

    Enabled = true

    URLPrefix = wsman

    CertificateThumbprint

    ListeningOn = 127.0.0.1, 157.59.85.27, ::1, 2001:4898:0:fff:200:5efe:157.59.85.27, 2001:4898:2b:3:594:e48f:e99a:de17, 2001:4898:2b:3:4c54:7d1e:a5f6:6ea, fe80::100:7f:fffe%11, fe80::200:5efe:157.59.85.27%13, fe80::4c54:7d1e:a5f6:6ea%12

 

Listener [Source="Compatibility"]

    Address = *

    Transport = HTTP

    Port = 80

    Hostname

    Enabled = true

    URLPrefix = wsman

    CertificateThumbprint

    ListeningOn = 127.0.0.1, 157.59.85.27, ::1, 2001:4898:0:fff:200:5efe:157.59.85.27, 2001:4898:2b:3:594:e48f:e99a:de17, 2001:4898:2b:3:4c54:7d1e:a5f6:6ea, fe80::100:7f:fffe%11, fe80::200:5efe:157.59.85.27%13, fe80::4c54:7d1e:a5f6:6ea%12

By default these settings are both set to Enabled = False for new installations of WinRM 2.0. For upgrades, the setting values will depend on the existing configuration. See the following section for more details.

Listener migration

The following table defines the listener settings that exist after upgrading to WinRM 2.0.

 

Existing Listener

Settings After Upgrade

Transport = HTTP

Port = 80

New listener with same settings created on port 5985

winrm/config/service/EnableCompatibilityHttpListener = True

Group Policy setting “Turn On Compatibility HTTP Listener” = Enabled

Transport = HTTP

Port not set to 80

Listener remains unchanged

winrm/config/service/EnableCompatibilityHttpListener = False

Group Policy setting “Turn On Compatibility HTTP Listener” = Not Configured

Transport = HTTPS

Port = 443

New listener with same settings created on port 5986

winrm/config/service/EnableCompatibilityHttpsListener = True

Group Policy setting “Turn On Compatibility HTTPS Listener” = Enabled

Transport = HTTPS

Port not set to 443

Listener remains unchanged

winrm/config/service/EnableCompatibilityHttpsListener = False

Group Policy setting “Turn On Compatibility HTTPS Listener” = Not Configured

 

 Important:

If the Group Policy settings are enabled through migration/upgrade, then the HTTP.sys reservations and SSL certificates are automatically set up. If an administrator enables the Group Policy settings directly these additional settings must also be configured through Group Policy.

 

PowerShell-specific changes

The New-PSSession PowerShell cmdlet has been modified to take these changes into account.  New-PsSession now takes on two different parameter sets:  ComputerName and ConnectionURI.

·         When the ComputerName parameter set is specified, then the default client port setting is used in the WinRM 2.0 configuration unless a port is explicitly specified.

·         When the ConnectionUri parameter is passed, then the string will be interpreted using ports 80 for HTTP and 443 for HTTPS by default. 

The following WSMan cmdlets have also undergone the same change as described above for New-PSSession.

·         Connect-WSMan

·         Get-WSManInstance

·         Invoke-WSManAction

·         New-WSManInstance

·         Remove-WSManInstance

·         Set-WSManInstance

WinRM-specific changes

The WinRM cmd line tool will share the behavior of the New-PSSession cmdlet in the following scenarios.

·         If a user passes a computer name to the winrm cmd line using the –r:<Computername> switch, then WinRM 2.0 will use the default client HTTP port, port 5985.

·         If a user passes a computer name to the winrm cmd line using the –r:<Computername> switch, and the –UseSSL flag is passed in, then WinRM 2.0 will use the default client HTTPS port, port 5986.

·         If a user passes a computer name to the winrm cmd line using the –r:<Computername> switch, and if a port is specified, then WinRM 2.0 will use the specified port.

·         If a user passes the connection URI to the winrm cmd line, as in the example –r:http://Mycomputer/wsman, then WinRM 2.0 will interpret the URI using ports 80 for HTTP and 443 for HTTPS by default.

Working in mixed environments

If you have a mixed environment of computers, where a number of them have WinRM 2.0 installed and a number do not, then there are a few scenarios that will require administrative action in order to maintain proper functionality.

·         If the client is updated so the default ports are 5985/5986 but the server is unchanged and it is still listening on ports 80/443, the client must either explicitly specify ports 80/443 when connecting or specify the remote machine using a ConnectionUri.

·         If the client operating system has a new installation of Windows 7, and the default ports are 5985 for HTTP and 5986 for HTTPS, but the server is unchanged so that it is still listening on 80/443, then the situation is the same. The client must either explicitly specify ports 80/443 when connecting or specify the remote server using a ConnectionUri.

·         If the server operating system has a new installation of Windows 7, and it is listening on ports 5985 for HTTP and 5986 for HTTPS, but the client is unchanged so that its default ports are still 80/443, the administrator must explicitly create listeners on ports 80/443.

Firewall rules

There are two firewall rules within the same group: one for port 80 and one for port 5985. The following table defines the status of these two rules in various upgrade scenarios.

 

 

Port 80 firewall rule

Port 5985 rule

Upgrade: port 80 rule enabled

Enabled

Enabled

Upgrade: port 80 rule disabled

Disabled

Disabled

New installation of WinRM 2.0

Disabled

Disabled

 


 

 Note:

When the compatibility listener is enabled, the firewall rule for port 80 will be enabled.

Event forwarding

The tables below lay out the various situations that may occur with event forwarding, and what steps need to be taken to correct potential issues.

Collector-initiated PUSH/PULL subscriptions

Collector

Source

Existing subscriptions

New subscriptions

New installation of Windows 7

New installation of Windows 7

Not Applicable

The event forwarding works correctly.

New installation of Windows 7

WinRM 1.1 installed

Not Applicable

Need to specify port 80 for HTTP explicitly.

New installation of Windows 7

Upgraded to WinRM 2.0

Not Applicable

The event forwarding works correctly.

WinRM 1.1 installed

New installation of Windows 7

Update subscriptions on the collector to add the port 5985 for HTTPS.

Need to specify port 5985 explicitly.

WinRM 1.1 installed

WinRM 1.1 installed

The event forwarding works correctly.

The event forwarding works correctly.

WinRM 1.1 installed

Upgraded to WinRM 2.0

The event forwarding works correctly.

The event forwarding works correctly.

Upgraded to WinRM 2.0

New installation of Windows 7

Update subscriptions on the collector to add the port 5985 for HTTPS.

The event forwarding works correctly.

Upgraded to WinRM 2.0

WinRM 1.1 installed

The event forwarding works correctly.

Need to specify port 80 for HTTP explicitly.

Upgraded to WinRM 2.0

Upgraded to WinRM 2.0

The event forwarding works correctly.

The event forwarding works correctly.

Source-initiated PUSH subscriptions with existing subscriptions specifying collector as Server=<FQDN>

Collector

Source

Existing subscriptions

New subscriptions

New installation of Windows 7

New installation of Windows 7

Not Applicable

Can specify the collector as Server=http://<FQDN>:5985 or Server=<FQDN>

New installation of Windows 7

WinRM 1.1 installed

Not Applicable

Need to specify the collector as Server=http://<FQDN>:5985

New installation of Windows 7

Upgraded to WinRM 2.0

Not Applicable

Can specify the collector as Server=http://<FQDN>:5985 or Server=<FQDN>

WinRM 1.1 installed

New installation of Windows 7

Update collector info on the source to Server=http://<FQDN>

Need to specify the collector as Server=http://<FQDN>

WinRM 1.1 installed

WinRM 1.1 installed

The event forwarding works correctly.

The event forwarding works correctly.

WinRM 1.1 installed

Upgraded to WinRM 2.0

Update collector info on the source to Server=http://<FQDN>

Need to specify the collector as Server=http://<FQDN>

Upgraded to WinRM 2.0

New installation of Windows 7

The event forwarding works correctly.

The event forwarding works correctly.

Upgraded to WinRM 2.0

WinRM 1.1 installed

The event forwarding works correctly.

The event forwarding works correctly.

Upgraded to WinRM 2.0

Upgraded to WinRM 2.0

The event forwarding works correctly.

The event forwarding works correctly.

Source-initiated PUSH subscriptions with existing subscriptions specifying collector as Server=http://<FQDN>

Collector

Source

Existing subscriptions

New subscriptions

New installation of Windows 7

New installation of Windows 7

Not Available

Can specify the collector as Server=http://<FQDN>:5985 or Server=<FQDN>

New installation of Windows 7

WinRM 1.1 installed

Not Applicable

Need to specify the collector as Server=http://<FQDN>:5985

New installation of Windows 7

Upgraded to WinRM 2.0

Not Applicable

Can specify the collector as Server=http://<FQDN>:5985 or Server=<FQDN>

WinRM 1.1 installed

New installation of Windows 7

Update collector info on the source to Server=http://<FQDN>

Need to specify the collector as Server=http://<FQDN>

WinRM 1.1 installed

WinRM 1.1 installed

The event forwarding works correctly.

The event forwarding works correctly.

WinRM 1.1 installed

Upgraded to WinRM 2.0

Update collector info on the source to Server=http://<FQDN>

Need to specify the collector as Server=http://<FQDN>

Upgraded to WinRM 2.0

New installation of Windows 7

The event forwarding works correctly.

Can specify the collector as Server=http://<FQDN>:5985 or Server=<FQDN>

Upgraded to WinRM 2.0

WinRM 1.1 installed

The event forwarding works correctly.

Need to specify the collector as Server=http://<FQDN>:5985

Upgraded to WinRM 2.0

Upgraded to WinRM 2.0

The event forwarding works correctly.

Can specify the collector as Server=http://<FQDN>:5985 or Server=<FQDN>

 

Appendix B: WinRM Event IDs

The WinRM service processes WSMan requests received over the network. It uses HTTP.sys to listen on the network. The following is a list of all aspects that are part of this managed entity as identified in WinRM Event logs. Solutions to many errors are provided.

 More Information:

For more information about this topic, see:

WinRM Service

http://technet.microsoft.com/en-us/library/dd315594(WS.10).aspx

 

Configuration

Applies To: Windows Server 2008 R2

You can configure various aspects of the WinRM service. The configuration information is stored in the registry.

Event ID

Source

Message

10110

Microsoft-Windows-WinRM

The WinRM service cannot validate the client certificate because the revocation status of the certificate or one of the certificates in the certificate chain is either offline or stale. 

User Action 
Please ensure that the Certificate Revocation List is accessible and up-to-date.

10112

Microsoft-Windows-WinRM

The client certificate exceeded the maximum size allowed by the WinRM service.

User Action 
Please use a different client certificate or a different authentication mechanism.

10144

Microsoft-Windows-WinRM

The WinRM service had a failure reading the current configuration and is stopping. 

User Action 
Use the following command to restore defaults: 

winrm invoke Restore winrm/config @{} 

Then add any custom configuration settings and restart the service. 

Additional Data 
The error code is: %1 %%%1

10145

Microsoft-Windows-WinRM

The WinRM service had a failure applying the current configuration and is stopping. 

User Action 
Check for previous event log messages and restart the service.

10146

Microsoft-Windows-WinRM

The WinRM service had a failure reading the current configuration and is stopping. 

User Action 
Use the following command to restore defaults: 

winrm invoke Restore winrm/config @{} 

Then add any custom configuration settings and restart the service. 

Additional Data 
The error code is: %1 %%%1

10147

Microsoft-Windows-WinRM

The host name pattern "%1" is invalid and it will be ignored. Host name patterns must not be empty and they can contain at most one wildcard ("*"). "*" pattern can be used to indicate all hosts; if this pattern is used, no other pattern can show up in the list. Special string "&lt;local&gt;" can be used to indicate all host names that do not have a '.'

User Action 
Correct the host name pattern using the syntax described above.

10151

Microsoft-Windows-WinRM

The WinRM service had a failure (%1) reading configuration during ip address change notification. 

Service will continue running with old configuration.

User Action 
If immediate changes are required manually restart the service

10152

Microsoft-Windows-WinRM

The WinRM service successfully processed an address change notification.

10154

Microsoft-Windows-WinRM

The WinRM service failed to create the following SPN: %1. 

Additional Data 
The error received was %2: %%%2.

User Action 
The SPN can be created by an administrator using setspn.exe utility.

10156

Microsoft-Windows-WinRM

The WinRM service failed to initialize CredSSP. 

Additional Data 
The error received was %1.

User Action 
Configure CertificateThumbprint setting under the WinRM configuration for the service. Use the thumbprint of a valid certificate and make sure that Network Service has access to the private key of the certificate.

 

Listener Availability

Applies To: Windows Server 2008 R2

The Listener is a component of the WinRM service that indicates to the service which IP addresses and ports to listen on for WS-Management related requests. Users can create one or more listeners.

Event ID

Source

Message

10101

Microsoft-Windows-WinRM

The WinRM service is not listening for requests since it failed to listen on at least one address and port. 

Remote management using WinRM will fail. 

User Action 
Configure listeners by enabling GPO policy for Auto Configuration of listeners or manually create a listener using WinRM command line tool.

10102

Microsoft-Windows-WinRM

The WinRM service is not listening for %1 requests because there was a failure binding to the URL (%2) in HTTP.SYS. 

Another process is registered to listen on the WinRM service URL prefix. 

User Action 
Correct this problem by stopping the other process, changing its URL prefix, or by changing the configuration for the WS-Management listening address.

10104

Microsoft-Windows-WinRM

The WinRM service is not listening for HTTPS requests because there was a failure binding to the URL (%1) in HTTP.SYS. 

No remote requests will be serviced on that URL. 

User Action 
Please use "netsh http" to check if ACL for URL (%1) is set to Network Service. 

Additional Data 
The error code received from HTTP.sys is %2: %%%2

10111

Microsoft-Windows-WinRM

User authentication using Basic authentication scheme failed. 

Additional Data 
Unexpected error received from LogonUser %1: %%%1.

10114

Microsoft-Windows-WinRM

The SSL configuration for IP %1 and port %2 is shared with another service, such as Internet Information Services (IIS).

10119

Microsoft-Windows-WinRM

The WinRM service is unable to start because of a failure during initialization. 

Additional Data 
The error code is %1.

10120

Microsoft-Windows-WinRM

The WinRM service has received an unsecure HTTP connection from %1. 

This is not a secure configuration. 

User Action 
Set AllowUnencrypted to False in WinRM configuration to ensure packets are encrypted on the wire.

10121

Microsoft-Windows-WinRM

The WinRM service has been configured to accept basic authentication for unsecure HTTP connections. 

This is not a secure configuration. 

User Action 
Set AllowUnencrypted to False in WinRM configuration to ensure packets are encrypted on the wire.

10128

Microsoft-Windows-WinRM

The WinRM service is not listening for HTTP requests because there was a failure binding to the URL (%1) in HTTP.SYS. 

No remote requests will be serviced on that URL. 

User Action 
Please use "netsh http" to check if ACL for URL (%1) is set to Network Service. 

Additional Data 
The error code received from HTTP.sys is %2: %%%2

10130

Microsoft-Windows-WinRM

IP Filter %1 specified in the GPO policy for Auto Configuration of listeners is invalid and it will be ignored. Due to this issue, the WinRM service cannot use the autoconfigured listener. 

"*" is used to indicate that the service should listen on all available IPs on the machine. When "*" is used, other ranges cannot be specified in the filter. 

User Action 
Remove other IP ranges if "*" needs to be included in the IP Filter.

10131

Microsoft-Windows-WinRM

The IP Range %1 is invalid and it will be ignored. 

Ranges are specified using the syntax IP1-IP2. Multiple ranges are separated using "," as delimiter. 
Example IPv4 ranges: 2.0.0.1-2.0.0.20, 24.0.0.1-24.0.0.22 
Example IPv6 ranges: 3FFE:FFFF:7654:FEDA:1245:BA98:0000:0000-3FFE:FFFF:7654:FEDA:1245:BA98:3210:4562 

User Action 
Correct the IP filter %1 using the syntax described above.

10132

Microsoft-Windows-WinRM

The WinRM service is not listening for policy changes because there was a failure registering for changes to the contents of the WS-Management policy key. 

No group policy change will be serviced. 

User Action 
Stop and restart the WinRM service. 

Additional Data 
The error code was %1.

10136

Microsoft-Windows-WinRM

The WinRM service encountered a catastrophic security failure. The service can no longer run under its security context. 

User Action 
Stop and restart the WinRM service. 

Additional Data 
The error code is %1.

10148

Microsoft-Windows-WinRM

The WinRM service is listening for WS-Management requests. 

User Action 
Use the following command to see the specific IPs on which WinRM is listening: 

winrm enumerate winrm/config/listener

10149

Microsoft-Windows-WinRM

The WinRM service is not listening for WS-Management requests. 

User Action 
If you did not intentionally stop the service, use the following command to see the WinRM configuration: 

winrm enumerate winrm/config/listener

10150

Microsoft-Windows-WinRM

The WinRM service could not use the following listener to receive WS-Management requests. The listener is enabled but the listener does not have an IP address configured. 

User Action 
Check the underlying network configuration to determine if this listener has at least one valid IP. If the IP is valid, ensure that WinRM configuration does not exclude that IP address by using the following command: 

winrm get winrm/config/service 

Additional Data 
Listener transport: %1 
Listener address: %2

50179

Microsoft-Windows-WinRM

The WinRM service is stopping because there was a failure registering for changes to the IP addresses. 

User Action 
Restart the WinRM service. 

Additional Data 
The error code was %1.

50180

Microsoft-Windows-WinRM

The WinRM service is stopping because there was a failure registering for changes to the configuration. 

User Action 
Restart the WinRM service. 

Additional Data 
The error code was %1.

 

Plug-in Functionality

Applies To: Windows Server 2008 R2

Plug-ins are loaded and used by the WinRM service to provide various functions including: configuration, WMI access, and event forwarding.

 

Event ID

Source

Message

0

Microsoft-Windows-WinRM

WinRM loaded the following plugin: %1 (%2)

1

Microsoft-Windows-WinRM

WinRM unloaded the following plugin: %1 (%2)

10113

Microsoft-Windows-WinRM

Request processing failed because the WinRM service cannot load data or event source: DLL="%1" 

User Action 
Please check if "%1" exists. 

Additional Data 
Loading %1 failed with error="%2" (%%%2).

10155

Microsoft-Windows-WinRM

The WSMan service failed to read configuration of the following plugin: 
%1. 

The error received was %2: %%%2 
%3.

User Action 
Make sure this plugin configuration is valid.

 

Appendix C: WMI Code Reference

As WinRM is deeply intertwined with WMI there are often return codes, error constants and so on that, while reported by WinRM, originated in and relate to WMI. Knowing the meaning of these codes and what aspect of Windows they relate to can improve troubleshooting knowledge.

WMI Return Codes

This section proides a list of the WMI return codes that may be returned by scripts, C++ applications, or Wmic commands.

If an error occurs, WMI returns one of the following error codes as a 32-bit value where the two high-order bits indicate the severity code of the message.

Term

Description

0

Success

1

Informational

2

Warning

3

Error

 

 Important:

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.

 

WMI Error Constants

If an error occurs, WMI returns an error code as an HRESULT value. These codes may be returned by scripts, C++ applications, or Wmic.

Note  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.

Some methods in WMI classes can return system and network error codes (64 for example). You can check the definition of these types of error codes by using the net helpmsg command in the command prompt window. For example, the command net helpmsg 64 returns the message: The specified network name is no longer available.

 

Figure  SEQ Figure \* ARABIC 8: Common ranges of WMI errors

Term

Description

0x800410xx - 0x800440

Errors that originate in WMI itself.

A specific WMI operation failed because of

An error in the request, for example, a WQL query fails or the account does not have the correct permissions.

A WMI infrastructure problem, such as incorrect CIM or DCOM registration.

0x8007xxx

Errors originating in the core operating system. WMI may return this type of error because of an external failure, for example, DCOM security failure.

0x80040xxx

Errors originating in DCOM. For example, the DCOM configuration for operations to a remote computer may be incorrect.

0x80005xxx

Error originating from ADSI (Active Directory Service Interfaces) or LDAP (Lightweight Directory Access Protocol), for example, an Active Directory access failure when using the WMI Active Directory providers.

 

Some methods in WMI classes can return system and network error codes (64 for example). You can check the definition of these types of error codes by using the net helpmsg command in the command prompt window. For example, the command net helpmsg 64 returns the message: The specified network name is no longer available. In C++, you can call FormatMessage and specify C:\Windows\System32\wbem\wmiutils.dll as the message module.

Windows 2000, Windows NT 4.0, and Windows Me/98/95:  Use C:\Winnt\System32\wbem\wbemcomn.dll as the message module.

 

Figure  SEQ Figure \* ARABIC 9: Net Helpmsg return codes

Constant/value

Description

WBEM_E_FAILED
2147749889
0x80041001

Call failed.

WBEM_E_NOT_FOUND
2147749890
0x80041002

Object cannot be found.

WBEM_E_ACCESS_DENIED
2147749891
0x80041003

Current user does not have permission to perform the action.

WBEM_E_PROVIDER_FAILURE
2147749892
0x80041004

Provider has failed at some time other than during initialization.

WBEM_E_TYPE_MISMATCH
2147749893
0x80041005

Type mismatch occurred.

WBEM_E_OUT_OF_MEMORY
2147749894
0x80041006

Not enough memory for the operation.

WBEM_E_INVALID_CONTEXT
2147749895
0x80041007

The IWbemContext object is not valid.

WBEM_E_INVALID_PARAMETER
2147749896
0x80041008

One of the parameters to the call is not correct.

WBEM_E_NOT_AVAILABLE
2147749897
0x80041009

Resource, typically a remote server, is not currently available.

WBEM_E_CRITICAL_ERROR
2147749898
0x8004100A

Internal, critical, and unexpected error occurred. Report the error to Microsoft Technical Support.

WBEM_E_INVALID_STREAM
2147749899
0x8004100B

One or more network packets were corrupted during a remote session.

WBEM_E_NOT_SUPPORTED
2147749900
0x8004100C

Feature or operation is not supported.

WBEM_E_INVALID_SUPERCLASS
2147749901
0x8004100D

Parent class specified is not valid.

WBEM_E_INVALID_NAMESPACE
2147749902
0x8004100E

Namespace specified cannot be found.

WBEM_E_INVALID_OBJECT
2147749903
0x8004100F

Specified instance is not valid.

WBEM_E_INVALID_CLASS
2147749904
0x80041010

Specified class is not valid.

WBEM_E_PROVIDER_NOT_FOUND
2147749905
0x80041011

Provider referenced in the schema does not have a corresponding registration.

WBEM_E_INVALID_PROVIDER_REGISTRATION
2147749906

Provider referenced in the schema has an incorrect or incomplete registration.

This error may be caused by many conditions, including the following:

A missing #pragma namespace command in the Managed Object Format (MOF) file used to register the provider. The provider may be registered in the wrong WMI namespace.

Failure to retrieve the COM registration.

Invalid hosting model. For more information, see Provider Hosting and Security.

An invalid class specified in the registration.

Failure to create an instance of or inherit from the __Win32Provider class to create the provider registration in the MOF file.

WBEM_E_PROVIDER_LOAD_FAILURE
2147749907
0x80041013

COM cannot locate a provider referenced in the schema.

This error may be caused by many conditions, including the following:

Provider is using a WMI DLL that does not match the .lib file used when the provider was built.

Provider's DLL, or any of the DLLs on which it depends, is corrupt.

Provider failed to export DllRegisterServer.

In-process provider was not registered using the regsvr32 command.

Out-of-process provider was not registered using the /regserver switch. For example, myprog.exe /regserver.

WBEM_E_INITIALIZATION_FAILURE
2147749908
0x80041014

Component, such as a provider, failed to initialize for internal reasons.

WBEM_E_TRANSPORT_FAILURE
2147749909
0x80041015

Networking error that prevents normal operation has occurred.

WBEM_E_INVALID_OPERATION
2147749910
0x80041016

Requested operation is not valid. This error usually applies to invalid attempts to delete classes or properties.

WBEM_E_INVALID_QUERY
2147749911
0x80041017

Query was not syntactically valid.

WBEM_E_INVALID_QUERY_TYPE
2147749912
0x80041018

Requested query language is not supported.

WBEM_E_ALREADY_EXISTS
2147749913
0x80041019

In a put operation, the wbemChangeFlagCreateOnly flag was specified, but the instance already exists.

WBEM_E_OVERRIDE_NOT_ALLOWED
2147749914
0x8004101A

Not possible to perform the add operation on this qualifier because the owning object does not permit overrides.

WBEM_E_PROPAGATED_QUALIFIER
2147749915
0x8004101B

User attempted to delete a qualifier that was not owned. The qualifier was inherited from a parent class.

WBEM_E_PROPAGATED_PROPERTY
2147749916
0x8004101C

User attempted to delete a property that was not owned. The property was inherited from a parent class.

WBEM_E_UNEXPECTED
2147749917
0x8004101D

Client made an unexpected and illegal sequence of calls, such as calling EndEnumeration before calling BeginEnumeration.

WBEM_E_ILLEGAL_OPERATION
2147749918
0x8004101E

User requested an illegal operation, such as spawning a class from an instance.

WBEM_E_CANNOT_BE_KEY
2147749919
0x8004101F

Illegal attempt to specify a key qualifier on a property that cannot be a key. The keys are specified in the class definition for an object and cannot be altered on a per-instance basis.

WBEM_E_INCOMPLETE_CLASS
2147749920
0x80041020

Current object is not a valid class definition. Either it is incomplete or it has not been registered with WMI using SWbemObject.Put_.

WBEM_E_INVALID_SYNTAX
2147749921
0x80041021

Query is syntactically not valid.

WBEM_E_NONDECORATED_OBJECT
2147749922
0x80041022

Reserved for future use.

WBEM_E_READ_ONLY
2147749923
0x80041023

An attempt was made to modify a read-only property.

WBEM_E_PROVIDER_NOT_CAPABLE
2147749924
0x80041024

Provider cannot perform the requested operation. This can include a query that is too complex, retrieving an instance, creating or updating a class, deleting a class, or enumerating a class.

WBEM_E_CLASS_HAS_CHILDREN
2147749925
0x80041025

Attempt was made to make a change that invalidates a subclass.

WBEM_E_CLASS_HAS_INSTANCES
2147749926
0x80041026

Attempt was made to delete or modify a class that has instances.

WBEM_E_QUERY_NOT_IMPLEMENTED
2147749927
0x80041027

Reserved for future use.

WBEM_E_ILLEGAL_NULL
2147749928
0x80041028

Value of Nothing/NULL was specified for a property that must have a value, such as one that is marked by a Key, Indexed, or Not_Null qualifier.

WBEM_E_INVALID_QUALIFIER_TYPE
2147749929
0x80041029

Variant value for a qualifier was provided that is not a legal qualifier type.

WBEM_E_INVALID_PROPERTY_TYPE
2147749930
0x8004102A

CIM type specified for a property is not valid.

WBEM_E_VALUE_OUT_OF_RANGE
2147749931
0x8004102B

Request was made with an out-of-range value or it is incompatible with the type.

WBEM_E_CANNOT_BE_SINGLETON
2147749932
0x8004102C

Illegal attempt was made to make a class singleton, such as when the class is derived from a non-singleton class.

WBEM_E_INVALID_CIM_TYPE
2147749933
0x8004102D

CIM type specified is invalid.

WBEM_E_INVALID_METHOD
2147749934
0x8004102E

Requested method is not available.

WBEM_E_INVALID_METHOD_PARAMETERS
2147749935
0x8004102F

Parameters provided for the method are not valid.

WBEM_E_SYSTEM_PROPERTY
2147749936
0x80041030

There was an attempt to get qualifiers on a system property.

WBEM_E_INVALID_PROPERTY
2147749937
0x80041031

Property type is not recognized.

WBEM_E_CALL_CANCELLED
2147749938
0x80041032

Asynchronous process has been canceled internally or by the user. Note that due to the timing and nature of the asynchronous operation, the operation may not have been truly canceled.

WBEM_E_SHUTTING_DOWN
2147749939
0x80041033

User has requested an operation while WMI is in the process of shutting down.

WBEM_E_PROPAGATED_METHOD
2147749940
0x80041034

Attempt was made to reuse an existing method name from a parent class and the signatures do not match.

WBEM_E_UNSUPPORTED_PARAMETER
2147749941
0x80041035

One or more parameter values, such as a query text, is too complex or unsupported. WMI is therefore requested to retry the operation with simpler parameters.

WBEM_E_MISSING_PARAMETER_ID
2147749942
0x80041036

Parameter was missing from the method call.

WBEM_E_INVALID_PARAMETER_ID
2147749943
0x80041037

Method parameter has an invalid ID qualifier.

WBEM_E_NONCONSECUTIVE_PARAMETER_IDS
2147749944
0x80041038

One or more of the method parameters have ID qualifiers that are out of sequence.

WBEM_E_PARAMETER_ID_ON_RETVAL
2147749945
0x80041039

Return value for a method has an ID qualifier.

WBEM_E_INVALID_OBJECT_PATH
2147749946
0x8004103A

Specified object path was not valid.

WBEM_E_OUT_OF_DISK_SPACE
2147749947
0x8004103B

Disk is out of space or the 4 GB limit on WMI repository (CIM repository) size is reached.

Windows XP and Windows 2000/NT:  Disk is out of space.

WBEM_E_BUFFER_TOO_SMALL
2147749948
0x8004103C

Supplied buffer was too small to hold all of the objects in the enumerator or to read a string property.

WBEM_E_UNSUPPORTED_PUT_EXTENSION
2147749949
0x8004103D

Provider does not support the requested put operation.

WBEM_E_UNKNOWN_OBJECT_TYPE
2147749950
0x8004103E

Object with an incorrect type or version was encountered during marshaling.

WBEM_E_UNKNOWN_PACKET_TYPE
2147749951
0x8004103F

Packet with an incorrect type or version was encountered during marshaling.

WBEM_E_MARSHAL_VERSION_MISMATCH
2147749952
0x80041040

Packet has an unsupported version.

WBEM_E_MARSHAL_INVALID_SIGNATURE
2147749953
0x80041041

Packet appears to be corrupt.

WBEM_E_INVALID_QUALIFIER
2147749954
0x80041042

Attempt was made to mismatch qualifiers, such as putting [key] on an object instead of a property.

WBEM_E_INVALID_DUPLICATE_PARAMETER
2147749955
0x80041043

Duplicate parameter was declared in a CIM method.

WBEM_E_TOO_MUCH_DATA
2147749956
0x80041044

Reserved for future use.

WBEM_E_SERVER_TOO_BUSY
2147749957
0x80041045

Call to IWbemObjectSink::Indicate has failed. The provider can refire the event.

WBEM_E_INVALID_FLAVOR
2147749958
0x80041046

Specified qualifier flavor was invalid.

WBEM_E_CIRCULAR_REFERENCE
2147749959
0x80041047

Attempt was made to create a reference that is circular (for example, deriving a class from itself).

WBEM_E_UNSUPPORTED_CLASS_UPDATE
2147749960
0x80041048

Specified class is not supported.

WBEM_E_CANNOT_CHANGE_KEY_INHERITANCE
2147749961
0x80041049

Attempt was made to change a key when instances or subclasses are already using the key.

WBEM_E_CANNOT_CHANGE_INDEX_INHERITANCE
2147749968
0x80041050

An attempt was made to change an index when instances or subclasses are already using the index.

WBEM_E_TOO_MANY_PROPERTIES
2147749969
0x80041051

Attempt was made to create more properties than the current version of the class supports.

WBEM_E_UPDATE_TYPE_MISMATCH
2147749970
0x80041052

Property was redefined with a conflicting type in a derived class.

WBEM_E_UPDATE_OVERRIDE_NOT_ALLOWED
2147749971
0x80041053

Attempt was made in a derived class to override a qualifier that cannot be overridden.

WBEM_E_UPDATE_PROPAGATED_METHOD
2147749972
0x80041054

Method was re-declared with a conflicting signature in a derived class.

WBEM_E_METHOD_NOT_IMPLEMENTED
2147749973
0x80041055

Attempt was made to execute a method not marked with [implemented] in any relevant class.

WBEM_E_METHOD_DISABLED

Attempt was made to execute a method marked with [disabled].

WBEM_E_REFRESHER_BUSY
2147749975
0x80041057

Refresher is busy with another operation.

WBEM_E_UNPARSABLE_QUERY
2147749976
0x80041058

Filtering query is syntactically invalid.

WBEM_E_NOT_EVENT_CLASS
2147749977
0x80041059

The FROM clause of a filtering query references a class that is not an event class (not derived from __Event).

WBEM_E_MISSING_GROUP_WITHIN
2147749978
0x8004105A

A GROUP BY clause was used without the corresponding GROUP WITHIN clause.

WBEM_E_MISSING_AGGREGATION_LIST
2147749979
0x8004105B

A GROUP BY clause was used. Aggregation on all properties is not supported.

WBEM_E_PROPERTY_NOT_AN_OBJECT
2147749980
0x8004105C

Dot notation was used on a property that is not an embedded object.

WBEM_E_AGGREGATING_BY_OBJECT
2147749981
0x8004105D

A GROUP BY clause references a property that is an embedded object without using dot notation.

WBEM_E_UNINTERPRETABLE_PROVIDER_QUERY
2147749983
0x8004105F

Event provider registration query (__EventProviderRegistration) did not specify the classes for which events were provided.

WBEM_E_BACKUP_RESTORE_WINMGMT_RUNNING
2147749984
0x80041060

Request was made to back up or restore the repository while it was in use by WinMgmt.exe, or by the SVCHOST process that contains the WMI service.

WBEM_E_QUEUE_OVERFLOW
2147749985
0x80041061

Asynchronous delivery queue overflowed from the event consumer being too slow.

WBEM_E_PRIVILEGE_NOT_HELD
2147749986
0x80041062

Operation failed because the client did not have the necessary security privilege.

WBEM_E_INVALID_OPERATOR
2147749987
0x80041063

Operator is invalid for this property type.

WBEM_E_LOCAL_CREDENTIALS
2147749988
0x80041064

User specified a username/password/authority on a local connection. The user must use a blank username/password and rely on default security.

WBEM_E_CANNOT_BE_ABSTRACT
2147749989
0x80041065

Class was made abstract when its parent class is not abstract.

WBEM_E_AMENDED_OBJECT
2147749990
0x80041066

Amended object was written without the WBEM_FLAG_USE_AMENDED_QUALIFIERS flag being specified.

WBEM_E_CLIENT_TOO_SLOW
2147749991
0x80041067

Client did not retrieve objects quickly enough from an enumeration. This constant is returned when a client creates an enumeration object, but does not retrieve objects from the enumerator in a timely fashion, causing the enumerator's object caches to back up.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_NULL_SECURITY_DESCRIPTOR
2147749992
0x80041068

Null security descriptor was used.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_TIMED_OUT
2147749993
0x80041069

Operation timed out.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_INVALID_ASSOCIATION
2147749994

Association is not valid.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_AMBIGUOUS_OPERATION
2147749995
0x8004106B

Operation was ambiguous.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_QUOTA_VIOLATION
2147749996
0x8004106C

WMI is taking up too much memory. This can be caused by low memory availability or excessive memory consumption by WMI.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_TRANSACTION_CONFLICT
2147749997
0x8004106D

Operation resulted in a transaction conflict.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_FORCED_ROLLBACK
2147749998
0x8004106E

Transaction forced a rollback.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_UNSUPPORTED_LOCALE
2147749999
0x8004106F

Locale used in the call is not supported.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_HANDLE_OUT_OF_DATE
2147750000
0x80041070

Object handle is out-of-date.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_CONNECTION_FAILED
2147750001
0x80041071

Connection to the SQL database failed.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_INVALID_HANDLE_REQUEST
2147750002
0x80041072

Handle request was invalid.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_PROPERTY_NAME_TOO_WIDE
2147750003
0x80041073

Property name contains more than 255 characters.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_CLASS_NAME_TOO_WIDE
2147750004
0x80041074

Class name contains more than 255 characters.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_METHOD_NAME_TOO_WIDE
2147750005
0x80041075

Method name contains more than 255 characters.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_QUALIFIER_NAME_TOO_WIDE
2147750006
0x80041076

Qualifier name contains more than 255 characters.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_RERUN_COMMAND
2147750007
0x80041077

The SQL command must be rerun because there is a deadlock in SQL. This can be returned only when data is being stored in an SQL database.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_DATABASE_VER_MISMATCH
2147750008
0x80041078

Database version does not match the version that the repository driver understands.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_VETO_DELETE
2147750009
0x80041079

WMI cannot execute the delete operation because the provider does not allow it.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_VETO_PUT
2147750010
0x8004107A

WMI cannot execute the put operation because the provider does not allow it.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_INVALID_LOCALE
2147750016
0x80041080

Specified locale identifier was invalid for the operation.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_PROVIDER_SUSPENDED
2147750017
0x80041081

Provider is suspended.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_SYNCHRONIZATION_REQUIRED
2147750018
0x80041082

Object must be written to the WMI repository and retrieved again before the requested operation can succeed. This constant is returned when an object must be committed and retrieved to see the property value.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_NO_SCHEMA
2147750019
0x80041083

Operation cannot be completed; no schema is available.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_PROVIDER_ALREADY_REGISTERED
02147750020
0x119FD010

Provider cannot be registered because it is already registered.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_PROVIDER_NOT_REGISTERED
2147750021
0x80041085

Provider was not registered.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_FATAL_TRANSPORT_ERROR
2147750022
0x80041086

Fatal transport error occurred.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_ENCRYPTED_CONNECTION_REQUIRED
2147750023
0x80041087

User attempted to set a computer name or domain without an encrypted connection.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_PROVIDER_TIMED_OUT
2147750024
0x80041088

A provider failed to report results within the specified timeout.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_NO_KEY
2147750025
0x80041089

User attempted to put an instance with no defined key.

Windows 2000 and Windows NT:  This error constant is not available.

WBEM_E_PROVIDER_DISABLED
2147750026
0x8004108A

User attempted to register a provider instance but the COM server for the provider instance was unloaded.

Windows 2000 and Windows NT:  This error constant is not available.

WBEMESS_E_REGISTRATION_TOO_BROAD
2147753985
0x80042001

Provider registration overlaps with the system event domain.

WBEMESS_E_REGISTRATION_TOO_PRECISE
2147753986
0x80042002

A WITHIN clause was not used in this query.

WBEMESS_E_AUTHZ_NOT_PRIVILEGED
2147753987
0x80042003

This computer does not have the necessary domain permissions to support the security functions that relate to the created subscription instance. Contact the Domain Administrator to get this computer added to the Windows Authorization Access Group.

WBEM_E_RETRY_LATER
2147758081
0x80043001

Reserved for future use.

WBEM_E_RESOURCE_CONTENTION
2147758082
0x80043002

Reserved for future use.

WBEMMOF_E_EXPECTED_QUALIFIER_NAME
2147762177
0x80044001

Expected a qualifier name.

WBEMMOF_E_EXPECTED_SEMI
2147762178
0x80044002

Expected semicolon or '='.

WBEMMOF_E_EXPECTED_OPEN_BRACE
2147762179
0x80044003

Expected an opening brace.

WBEMMOF_E_EXPECTED_CLOSE_BRACE
2147762180
0x80044004

Missing closing brace or an illegal array element.

WBEMMOF_E_EXPECTED_CLOSE_BRACKET
2147762181
0x80044005

Expected a closing bracket.

WBEMMOF_E_EXPECTED_CLOSE_PAREN
2147762182
0x80044006

Expected closing parenthesis.

WBEMMOF_E_ILLEGAL_CONSTANT_VALUE
2147762183
0x80044007

Numeric value out of range or strings without quotes.

WBEMMOF_E_EXPECTED_TYPE_IDENTIFIER
2147762184
0x80044008

Expected a type identifier.

WBEMMOF_E_EXPECTED_OPEN_PAREN
2147762185
0x80044009

Expected an open parenthesis.

WBEMMOF_E_UNRECOGNIZED_TOKEN
2147762186
0x8004400A

Unexpected token in the file.

WBEMMOF_E_UNRECOGNIZED_TYPE
2147762187
0x8004400B

Unrecognized or unsupported type identifier.

WBEMMOF_E_EXPECTED_PROPERTY_NAME
2147762187
0x8004400B

Expected property or method name.

WBEMMOF_E_TYPEDEF_NOT_SUPPORTED
2147762189
0x8004400D

Typedefs and enumerated types are not supported.

WBEMMOF_E_UNEXPECTED_ALIAS
2147762190
0x8004400E

Only a reference to a class object can have an alias value.

WBEMMOF_E_UNEXPECTED_ARRAY_INIT
2147762191
0x8004400F

Unexpected array initialization. Arrays must be declared with [].

WBEMMOF_E_INVALID_AMENDMENT_SYNTAX
2147762192
0x80044010

Invalid namespace path syntax.

WBEMMOF_E_INVALID_DUPLICATE_AMENDMENT
2147762193
0x80044011

Duplicate amendment specifiers.

WBEMMOF_E_INVALID_PRAGMA
2147762194
0x80044012

#pragma must be followed by a valid keyword.

WBEMMOF_E_INVALID_NAMESPACE_SYNTAX
2147762195
0x80044013

Invalid namespace path syntax.

WBEMMOF_E_EXPECTED_CLASS_NAME
2147762196
0x80044014

Unexpected character in class name must be an identifier.

WBEMMOF_E_TYPE_MISMATCH
2147762197
0x80044015

The value specified cannot be made into the appropriate type.

WBEMMOF_E_EXPECTED_ALIAS_NAME
2147762198
0x80044016

Dollar sign must be followed by an alias name as an identifier.

WBEMMOF_E_INVALID_CLASS_DECLARATION
2147762199
0x80044017

Invalid class declaration.

WBEMMOF_E_INVALID_INSTANCE_DECLARATION
2147762200
0x80044018

The instance declaration is invalid. It must start with "instance of"

WBEMMOF_E_EXPECTED_DOLLAR
2147762201
0x80044019

Expected dollar sign. An alias in the form "$name" must follow the "as" keyword.

WBEMMOF_E_CIMTYPE_QUALIFIER
2147762202
0x8004401A

"CIMTYPE" qualifier cannot be specified directly in a MOF file. Use standard type notation.

WBEMMOF_E_DUPLICATE_PROPERTY
2147762203
0x8004401B

Duplicate property name was found in the MOF.

WBEMMOF_E_INVALID_NAMESPACE_SPECIFICATION
2147762204
0x8004401C

Invalid namespace syntax. References to other servers are not allowed.

WBEMMOF_E_OUT_OF_RANGE
2147762205
0x8004401D

Value out of range.

WBEMMOF_E_INVALID_FILE
2147762206
0x8004401E

The file is not a valid text MOF file or binary MOF file.

WBEMMOF_E_ALIASES_IN_EMBEDDED
2147762207
0x8004401F

Embedded objects cannot be aliases.

WBEMMOF_E_NULL_ARRAY_ELEM
2147762208
0x80044020

NULL elements in an array are not supported.

WBEMMOF_E_DUPLICATE_QUALIFIER
2147762209
0x80044021

Qualifier was used more than once on the object.

WBEMMOF_E_EXPECTED_FLAVOR_TYPE
2147762210
0x80044022

Expected a flavor type such as ToInstance, ToSubClass, EnableOverride, or DisableOverride.

WBEMMOF_E_INCOMPATIBLE_FLAVOR_TYPES
2147762211
0x80044023

Combining EnableOverride and DisableOverride on same qualifier is not legal.

WBEMMOF_E_MULTIPLE_ALIASES
2147762212
0x80044024

An alias cannot be used twice.

WBEMMOF_E_INCOMPATIBLE_FLAVOR_TYPES2
2147762213
0x80044025

Combining Restricted, and ToInstance or ToSubClass is not legal.

WBEMMOF_E_NO_ARRAYS_RETURNED
2147762214
0x80044026

Methods cannot return array values.

WBEMMOF_E_MUST_BE_IN_OR_OUT
2147762215
0x80044027

Arguments must have an In or Out qualifier.

WBEMMOF_E_INVALID_FLAGS_SYNTAX
2147762216
0x80044028

Invalid flags syntax.

WBEMMOF_E_EXPECTED_BRACE_OR_BAD_TYPE
2147762217
0x80044029

The final brace and semi-colon for a class are missing.

WBEMMOF_E_UNSUPPORTED_CIMV22_QUAL_VALUE
2147762218
0x8004402A

A CIM version 2.2 feature is not supported for a qualifier value.

WBEMMOF_E_UNSUPPORTED_CIMV22_DATA_TYPE
2147762219
0x8004402B

The CIM version 2.2 data type is not supported.

WBEMMOF_E_INVALID_DELETEINSTANCE_SYNTAX
2147762220
0x8004402C

Invalid delete instance syntax. It should be #pragma DeleteInstance("instancepath", FAIL|NOFAIL)

WBEMMOF_E_INVALID_QUALIFIER_SYNTAX
2147762221
0x8004402D

Invalid qualifier syntax. It should be qualifiername:type=value,scope(class|instance), flavorname.

WBEMMOF_E_QUALIFIER_USED_OUTSIDE_SCOPE
2147762222
0x8004402E

The qualifier is used outside of its scope.

WBEMMOF_E_ERROR_CREATING_TEMP_FILE
2147762223
0x8004402F

Error creating temporary file. The temporary file is an intermediate stage in the MOF compilation.

WBEMMOF_E_ERROR_INVALID_INCLUDE_FILE
2147762224
0x80044030

A file included in the MOF by the preprocessor command #include is invalid.

WBEMMOF_E_INVALID_DELETECLASS_SYNTAX
2147762225
0x80044031

The syntax for the preprocessor commands #pragma deleteinstance or #pragma deleteclass is not valid.

 

 

WMI Non-Error Constants

If an operation does not result in an error, WMI returns one of the following codes as an HRESULT that indicates the status of the operation.

Note  Some methods in WMI classes can return system and network error codes (64 for example). You can check the definition of these types of error codes by using the net helpmsg command in the command prompt window. For example, the command net helpmsg 64 returns the message: The specified network name is no longer available.

In C++, you can call FormatMessage and specify C:\Windows\System32\wbem\wmiutils.dll as the message module.

Windows 2000 and Windows NT 4.0:  Use C:\Winnt\System32\wbem\wbemcomn.dll as the message module.

Figure  SEQ Figure \* ARABIC 10: If an operation does not result in an error, WMI returns one of the following codes as an HRESULT that indicates the status of the operation

Constant/value

Description

WBEM_S_NO_ERROR

0 (0x0)

The operation was successful.

WBEM_S_FALSE

1 (0x1)

No more objects are available, the number of objects returned is less than the number requested, or this is the end of an enumeration. This value is also returned when this method is called with a value of 0 for the uCount parameter.

WBEM_S_ALREADY_EXISTS

262145 (0x40001)

An attempt was made to create an object or class that already exists.

WBEM_S_RESET_TO_DEFAULT

262146 (0x40002)

An overridden property was deleted. This value is returned to signal that the original non-overridden value has been restored as a result of the deletion.

WBEM_S_DIFFERENT

262147 (0x40003)

The items (objects, classes, and so on) that are being compared are not identical.

WBEM_S_TIMEDOUT

262148 (0x40004)

A call timed out. This is not an error condition. Therefore, some results may have also been returned.

WBEM_S_NO_MORE_DATA

262149 (0x40005)

No more data is available from the enumeration, and the user must terminate the enumeration.

WBEM_S_OPERATION_CANCELLED

262150 (0x40006)

The operation was intentionally or unintentionally canceled.

WBEM_S_PENDING

262151 (0x40007)

A request is still in progress, and the results are not yet available.

WBEM_S_DUPLICATE_OBJECTS

262152 (0x40008)

More thatn one copy of the same object was detected in the result set of an enumeration.

WBEM_S_ACCESS_DENIED

262153 (0x40009)

The user was denied access to some but not all resources.

WBEM_S_PARTIAL_RESULTS

262160 (0x40010)

The user did not receive all of the objects requested due to inaccessible resources (other than security violations).

WBEM_S_LIMITED_SERVICE

274433 (0x43001)

The provider is capable of limited service.

WBEM_S_INDIRECTLY_UPDATED

274434 (0x43002)

Reserved for future use.

 

 

 

Appendix D: WSMan PowerShell Reference

PowerShell, unlike a command console, is tightly integrated with WinRM. Operations not possible outside of direct API calls are available in PowerShell. A primer on how information available to assist.

about_WS-Management_Cmdlets

Type the following command for the about_wsman file.

PS C:\Windows\system32> get-help about_wsman

TOPIC

    about_WS-Management_Cmdlets

 

SHORT DESCRIPTION

    Provides an overview of Web Services for Management (WS-Management) as

    background for using the WS-Management cmdlets in Windows PowerShell.

 

LONG DESCRIPTION

    This topic provides an overview of Web Services for Management

    (WS-Management) as background for using the WS-Management cmdlets in

    Windows PowerShell. This topic also provides links to more information

    about WS-Management. The Microsoft implementation of WS-Management is also

    known as Windows Remote Management (WinRM).

 

 

  About WS-Management

 

      Windows Remote Management is the Microsoft implementation

      of the WS-Management protocol, a standard SOAP-based, firewall-friendly

      protocol that allows hardware and operating systems from different

      vendors to interoperate. The WS-Management protocol specification

      provides a common way for systems to access and exchange management

      information across an information technology (IT) infrastructure.

      WS-Management and Intelligent Platform Management Interface (IPMI),

      along with the Event Collector, are components of the Windows Hardware

      Management features.

 

      The WS-Management protocol is based on the following standard Web service

      specifications: HTTPS, SOAP over HTTP (WS-I profile), SOAP 1.2,

      WS-Addressing, WS-Transfer, WS-Enumeration, and WS-Eventing.

 

 

  WS-Management and WMI

 

      WS-Management can be used to retrieve data exposed by Windows Management

      Instrumentation (WMI). You can obtain WMI data with scripts or

      applications that use the WS-Management Scripting API or through the

      WinRM command-line tool. WS-Management supports most of the familiar WMI

      classes and operations, including embedded objects. WS-Management can

      leverage WMI to collect data about resources or to manage resources on a

      Windows-based computers. That means that you can obtain data

      about objects such as disks, network adapters, services, or processes

      in your enterprise through the existing set of WMI classes. You can also

      access the hardware data that is available from the standard WMI IPMI

      provider.

 

 

  WS-Management Windows PowerShell Provider

 

      The WS-Management provider provides a hierarchical view into the

      available WS-Management configuration settings. The provider allows you

      to explore and set the various WS-Management configuration options.

 

 

  WS-Management Configuration

 

      If WS-Management is not installed and configured, Windows PowerShell

      remoting is not available, the WS-Management cmdlets do not run,

      WS-Management scripts do not run, and the WS-Management provider cannot

      perform data operations. The WS-Management command-line tool, WinRM,

      and event forwarding also depend on the WS-Management configuration.

 

 

  WS-Management Cmdlets

 

      WS-Management functionality is implemented in Windows PowerShell through

      a module that contains a set of cmdlets and the WS-Management provider.

      You can use these cmdlets to complete the end-to-end tasks necessary

      to manage WS-Management settings on local and remote computers.

 

      The following WS-Management cmdlets are available.

 

     Connection Cmdlets

 

     -- Connect-WSMan: Connects the local computer to the WS-Management

        (WinRM) service on a remote computer.

 

     -- Disconnect-WSMan: Disconnects the local computer from the WS-Management

        (WinRM) service on a remote computer.

 

     Management-Data Cmdlets

 

     -- Get-WSManInstance: Displays management information for a resource

        instance that is specified by a resource URI.

 

     -- Invoke-WSManAction: Invokes an action on the target object that

        is specified by the resource URI and by the selectors.

 

     -- New-WSManInstance: Creates a new management resource instance.

 

     -- Remove-WSManInstance: Deletes a management resource instance.

 

     -- Set-WSManInstance: Modifies the management information that is

        related to a resource.

 

     Setup and Configuration Cmdlets

 

     -- Set-WSManQuickConfig: Configures the local computer for remote

        management. You can use the Set-WSManQuickConfig cmdlet to configure

        WS-Management to allow remote connections to the WS-Management (WinRM)

        service. The Set-WSManQuickConfig cmdlet performs the following

        operations:

 

        - It determines whether the WS-Management (WinRM) service is running.

          If the WinRM service is not running, the Set-WSManQuickConfig cmdlet

          starts the service.

 

        - It sets the WS-Management (WinRM) service startup type to automatic.

 

        - It creates a listener that accepts requests from any IP address.

          The default transport protocol is HTTP.

 

        - It enables a firewall exception for WS-Management traffic.

 

        Note: To run this cmdlet in Windows Vista, Windows Server 2008, and

              later versions of Windows, you must start Windows PowerShell

              with the "Run as administrator" option.

 

     -- Test-WSMan: Verifies that WS-Management is installed and configured.

        The Test-WSMan cmdlet tests whether the WS-Management (WinRM)

        service is running and configured on a local or remote computer.

 

     -- Disable-WSManCredSSP: Disables CredSSP authentication on a client

        computer.

 

     -- Enable-WSManCredSSP: Enables CredSSP authentication on a client

        computer.

 

     -- Get-WSManCredSSP: Gets the CredSSP-related configuration for a

        client computer.

 

     WS-Management-Specific Cmdlets

 

     -- New-WSManSessionOption: Creates a WSManSessionOption object to use as

        input to one or more parameters of a WS-Management cmdlet.

 

 

  Additional WS-Management Information

 

    For more information about WS-Management, see the following topics in the

    MSDN (Microsoft Developer Network) library.

 

      "Windows Remote Management"

      http://go.microsoft.com/fwlink/?LinkId=142321

 

      "About Windows Remote Management"

      http://go.microsoft.com/fwlink/?LinkId=142322

 

      "Installation and Configuration for Windows Remote Management"

      http://go.microsoft.com/fwlink/?LinkId=142323

 

      "Windows Remote Management Architecture"

      http://go.microsoft.com/fwlink/?LinkId=142324

 

      "WS-Management Protocol"

      http://go.microsoft.com/fwlink/?LinkId=142325

 

      "Windows Remote Management and WMI"

      http://go.microsoft.com/fwlink/?LinkId=142326

 

      "Resource URIs"

      http://go.microsoft.com/fwlink/?LinkId=142327

 

      "Remote Hardware Management"

      http://go.microsoft.com/fwlink/?LinkId=142328

 

      "Events"

      http://go.microsoft.com/fwlink/?LinkId=142329

 

 

SEE ALSO

    Online version: http://go.microsoft.com/fwlink/?LinkId=142331

    Connect-WSMan

    Disable-WSManCredSSP

    Disconnect-WSMan

    Enable-WSManCredSSP

    Get-WSManCredSSP

    Get-WSManInstance

    Invoke-WSManAction

    New-WSManInstance

    Remove-WSManInstance

    Set-WSManInstance

    Set-WSManQuickConfig

    Set-WSManSessionOption

    Test-WSMan

 

KEYWORDS

    about_WSMAN about_WinRM