This lesson explains | introduces | provides a detailed …
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
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.
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.
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.
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
WinRM communicates through http.sys, so anything that is bound to http.sys using the same port as WinRM will cause a problem.
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
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'
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, 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.
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.
Membership in the Local Administrators group on the remote system is usually sufficient to perform the actions requested by WinRM.
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
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.

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

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

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
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
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.'
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)
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
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.
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.
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'
|
|
Test remote connectivity to the WinRM service with: winrm get wmicimv2/Win32_Service?Name=WinRM -r:machinename |
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!
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>
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>
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>
winrm invoke GetVersion wmi/root/scvmm/AgentManagement -r:<remoteserver> @{}
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
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.
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.
|
|
'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
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 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
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.
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
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.
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.

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.
|
|
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 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.
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.
|
|
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} |
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.
|
|
Logeater converts WPP traces other than WinRM. It's developers are open to submissions for new trace type conversions. Contact them for information. |

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

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

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

5. Select “Windows Remote Management Trace”.

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

7. Select all Values and click OK.

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

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

10. Click Next.

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

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

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.

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.
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
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
|
|
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 |
|
|
Required TMF files are available on various shares (see GES), also located here: \\ncscs\Tools\SCVMM\TMF_Files |
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 **
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.
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.
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.
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.
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.
|
|
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. |
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
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
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
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
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.
1. Summary
d. PowerShell-specific changes
f. Working in mixed environments
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.
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.
|
|
If the default client ports are set to something other than 80/443, they will not be modified. |
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.
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 |
|
|
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. |
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
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.
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.
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 |
|
|
When the compatibility listener is enabled, the firewall rule for port 80 will be enabled. |
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 |
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. |
|
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. |
|
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> |
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.
|
|
For more information about this topic, see: WinRM Service http://technet.microsoft.com/en-us/library/dd315594(WS.10).aspx |
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 |
|
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. |
|
|
Microsoft-Windows-WinRM |
The client certificate exceeded the
maximum size allowed by the WinRM service. |
|
|
Microsoft-Windows-WinRM |
The WinRM service had a failure reading
the current configuration and is stopping. |
|
|
Microsoft-Windows-WinRM |
The WinRM service had a failure applying
the current configuration and is stopping. |
|
|
Microsoft-Windows-WinRM |
The WinRM service had a failure reading
the current configuration and is stopping. |
|
|
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 "<local>" can be used to indicate all host
names that do not have a '.' |
|
|
Microsoft-Windows-WinRM |
The WinRM service had a failure (%1)
reading configuration during ip address change notification. |
|
|
Microsoft-Windows-WinRM |
The WinRM service successfully processed an address change notification. |
|
|
Microsoft-Windows-WinRM |
The WinRM service failed to create the
following SPN: %1. |
|
|
Microsoft-Windows-WinRM |
The WinRM service failed to initialize
CredSSP. |
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 |
|
Microsoft-Windows-WinRM |
The WinRM service is not listening for
requests since it failed to listen on at least one address and port. |
|
|
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. |
|
|
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. |
|
|
Microsoft-Windows-WinRM |
User authentication using Basic
authentication scheme failed. |
|
|
Microsoft-Windows-WinRM |
The SSL configuration for IP %1 and port %2 is shared with another service, such as Internet Information Services (IIS). |
|
|
Microsoft-Windows-WinRM |
The WinRM service is unable to start
because of a failure during initialization. |
|
|
Microsoft-Windows-WinRM |
The WinRM service has received an
unsecure HTTP connection from %1. |
|
|
Microsoft-Windows-WinRM |
The WinRM service has been configured to
accept basic authentication for unsecure HTTP connections. |
|
|
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. |
|
|
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. |
|
|
Microsoft-Windows-WinRM |
The IP Range %1 is invalid and it will be
ignored. |
|
|
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. |
|
|
Microsoft-Windows-WinRM |
The WinRM service encountered a
catastrophic security failure. The service can no longer run under its
security context. |
|
|
Microsoft-Windows-WinRM |
The WinRM service is listening for
WS-Management requests. |
|
|
Microsoft-Windows-WinRM |
The WinRM service is not listening for
WS-Management requests. |
|
|
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. |
|
|
Microsoft-Windows-WinRM |
The WinRM service is stopping because
there was a failure registering for changes to the IP addresses. |
|
|
Microsoft-Windows-WinRM |
The WinRM service is stopping because
there was a failure registering for changes to the configuration. |
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 |
|
Microsoft-Windows-WinRM |
WinRM loaded the following plugin: %1 (%2) |
|
|
Microsoft-Windows-WinRM |
WinRM unloaded the following plugin: %1 (%2) |
|
|
Microsoft-Windows-WinRM |
Request processing failed because the
WinRM service cannot load data or event source: DLL="%1" |
|
|
Microsoft-Windows-WinRM |
The WSMan service failed to read
configuration of the following plugin: |
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.
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 |
|
|
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.
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 |
Call failed. |
|
WBEM_E_NOT_FOUND |
Object cannot be found. |
|
WBEM_E_ACCESS_DENIED |
Current user does not have permission to perform the action. |
|
WBEM_E_PROVIDER_FAILURE |
Provider has failed at some time other than during initialization. |
|
WBEM_E_TYPE_MISMATCH |
Type mismatch occurred. |
|
WBEM_E_OUT_OF_MEMORY |
Not enough memory for the operation. |
|
WBEM_E_INVALID_CONTEXT |
The IWbemContext object is not valid. |
|
WBEM_E_INVALID_PARAMETER |
One of the parameters to the call is not correct. |
|
WBEM_E_NOT_AVAILABLE |
Resource, typically a remote server, is not currently available. |
|
WBEM_E_CRITICAL_ERROR |
Internal, critical, and unexpected error occurred. Report the error to Microsoft Technical Support. |
|
WBEM_E_INVALID_STREAM |
One or more network packets were corrupted during a remote session. |
|
WBEM_E_NOT_SUPPORTED |
Feature or operation is not supported. |
|
WBEM_E_INVALID_SUPERCLASS |
Parent class specified is not valid. |
|
WBEM_E_INVALID_NAMESPACE |
Namespace specified cannot be found. |
|
WBEM_E_INVALID_OBJECT |
Specified instance is not valid. |
|
WBEM_E_INVALID_CLASS |
Specified class is not valid. |
|
WBEM_E_PROVIDER_NOT_FOUND |
Provider referenced in the schema does not have a corresponding registration. |
|
WBEM_E_INVALID_PROVIDER_REGISTRATION |
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 |
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 |
Component, such as a provider, failed to initialize for internal reasons. |
|
WBEM_E_TRANSPORT_FAILURE |
Networking error that prevents normal operation has occurred. |
|
WBEM_E_INVALID_OPERATION |
Requested operation is not valid. This error usually applies to invalid attempts to delete classes or properties. |
|
WBEM_E_INVALID_QUERY |
Query was not syntactically valid. |
|
WBEM_E_INVALID_QUERY_TYPE |
Requested query language is not supported. |
|
WBEM_E_ALREADY_EXISTS |
In a put operation, the wbemChangeFlagCreateOnly flag was specified, but the instance already exists. |
|
WBEM_E_OVERRIDE_NOT_ALLOWED |
Not possible to perform the add operation on this qualifier because the owning object does not permit overrides. |
|
WBEM_E_PROPAGATED_QUALIFIER |
User attempted to delete a qualifier that was not owned. The qualifier was inherited from a parent class. |
|
WBEM_E_PROPAGATED_PROPERTY |
User attempted to delete a property that was not owned. The property was inherited from a parent class. |
|
WBEM_E_UNEXPECTED |
Client made an unexpected and illegal sequence of calls, such as calling EndEnumeration before calling BeginEnumeration. |
|
WBEM_E_ILLEGAL_OPERATION |
User requested an illegal operation, such as spawning a class from an instance. |
|
WBEM_E_CANNOT_BE_KEY |
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 |
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 |
Query is syntactically not valid. |
|
WBEM_E_NONDECORATED_OBJECT |
Reserved for future use. |
|
WBEM_E_READ_ONLY |
An attempt was made to modify a read-only property. |
|
WBEM_E_PROVIDER_NOT_CAPABLE |
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 |
Attempt was made to make a change that invalidates a subclass. |
|
WBEM_E_CLASS_HAS_INSTANCES |
Attempt was made to delete or modify a class that has instances. |
|
WBEM_E_QUERY_NOT_IMPLEMENTED |
Reserved for future use. |
|
WBEM_E_ILLEGAL_NULL |
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 |
Variant value for a qualifier was provided that is not a legal qualifier type. |
|
WBEM_E_INVALID_PROPERTY_TYPE |
CIM type specified for a property is not valid. |
|
WBEM_E_VALUE_OUT_OF_RANGE |
Request was made with an out-of-range value or it is incompatible with the type. |
|
WBEM_E_CANNOT_BE_SINGLETON |
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 |
CIM type specified is invalid. |
|
WBEM_E_INVALID_METHOD |
Requested method is not available. |
|
WBEM_E_INVALID_METHOD_PARAMETERS |
Parameters provided for the method are not valid. |
|
WBEM_E_SYSTEM_PROPERTY |
There was an attempt to get qualifiers on a system property. |
|
WBEM_E_INVALID_PROPERTY |
Property type is not recognized. |
|
WBEM_E_CALL_CANCELLED |
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 |
User has requested an operation while WMI is in the process of shutting down. |
|
WBEM_E_PROPAGATED_METHOD |
Attempt was made to reuse an existing method name from a parent class and the signatures do not match. |
|
WBEM_E_UNSUPPORTED_PARAMETER |
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 |
Parameter was missing from the method call. |
|
WBEM_E_INVALID_PARAMETER_ID |
Method parameter has an invalid ID qualifier. |
|
WBEM_E_NONCONSECUTIVE_PARAMETER_IDS |
One or more of the method parameters have ID qualifiers that are out of sequence. |
|
WBEM_E_PARAMETER_ID_ON_RETVAL |
Return value for a method has an ID qualifier. |
|
WBEM_E_INVALID_OBJECT_PATH |
Specified object path was not valid. |
|
WBEM_E_OUT_OF_DISK_SPACE |
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 |
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 |
Provider does not support the requested put operation. |
|
WBEM_E_UNKNOWN_OBJECT_TYPE |
Object with an incorrect type or version was encountered during marshaling. |
|
WBEM_E_UNKNOWN_PACKET_TYPE |
Packet with an incorrect type or version was encountered during marshaling. |
|
WBEM_E_MARSHAL_VERSION_MISMATCH |
Packet has an unsupported version. |
|
WBEM_E_MARSHAL_INVALID_SIGNATURE |
Packet appears to be corrupt. |
|
WBEM_E_INVALID_QUALIFIER |
Attempt was made to mismatch qualifiers, such as putting [key] on an object instead of a property. |
|
WBEM_E_INVALID_DUPLICATE_PARAMETER |
Duplicate parameter was declared in a CIM method. |
|
WBEM_E_TOO_MUCH_DATA |
Reserved for future use. |
|
WBEM_E_SERVER_TOO_BUSY |
Call to IWbemObjectSink::Indicate has failed. The provider can refire the event. |
|
WBEM_E_INVALID_FLAVOR |
Specified qualifier flavor was invalid. |
|
WBEM_E_CIRCULAR_REFERENCE |
Attempt was made to create a reference that is circular (for example, deriving a class from itself). |
|
WBEM_E_UNSUPPORTED_CLASS_UPDATE |
Specified class is not supported. |
|
WBEM_E_CANNOT_CHANGE_KEY_INHERITANCE |
Attempt was made to change a key when instances or subclasses are already using the key. |
|
WBEM_E_CANNOT_CHANGE_INDEX_INHERITANCE |
An attempt was made to change an index when instances or subclasses are already using the index. |
|
WBEM_E_TOO_MANY_PROPERTIES |
Attempt was made to create more properties than the current version of the class supports. |
|
WBEM_E_UPDATE_TYPE_MISMATCH |
Property was redefined with a conflicting type in a derived class. |
|
WBEM_E_UPDATE_OVERRIDE_NOT_ALLOWED |
Attempt was made in a derived class to override a qualifier that cannot be overridden. |
|
WBEM_E_UPDATE_PROPAGATED_METHOD |
Method was re-declared with a conflicting signature in a derived class. |
|
WBEM_E_METHOD_NOT_IMPLEMENTED |
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 |
Refresher is busy with another operation. |
|
WBEM_E_UNPARSABLE_QUERY |
Filtering query is syntactically invalid. |
|
WBEM_E_NOT_EVENT_CLASS |
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 |
A GROUP BY clause was used without the corresponding GROUP WITHIN clause. |
|
WBEM_E_MISSING_AGGREGATION_LIST |
A GROUP BY clause was used. Aggregation on all properties is not supported. |
|
WBEM_E_PROPERTY_NOT_AN_OBJECT |
Dot notation was used on a property that is not an embedded object. |
|
WBEM_E_AGGREGATING_BY_OBJECT |
A GROUP BY clause references a property that is an embedded object without using dot notation. |
|
WBEM_E_UNINTERPRETABLE_PROVIDER_QUERY |
Event provider registration query (__EventProviderRegistration) did not specify the classes for which events were provided. |
|
WBEM_E_BACKUP_RESTORE_WINMGMT_RUNNING |
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 |
Asynchronous delivery queue overflowed from the event consumer being too slow. |
|
WBEM_E_PRIVILEGE_NOT_HELD |
Operation failed because the client did not have the necessary security privilege. |
|
WBEM_E_INVALID_OPERATOR |
Operator is invalid for this property type. |
|
WBEM_E_LOCAL_CREDENTIALS |
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 |
Class was made abstract when its parent class is not abstract. |
|
WBEM_E_AMENDED_OBJECT |
Amended object was written without the WBEM_FLAG_USE_AMENDED_QUALIFIERS flag being specified. |
|
WBEM_E_CLIENT_TOO_SLOW |
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 |
Null security descriptor was used. Windows 2000 and Windows NT: This error constant is not available. |
|
WBEM_E_TIMED_OUT |
Operation timed out. Windows 2000 and Windows NT: This error constant is not available. |
|
WBEM_E_INVALID_ASSOCIATION |
Association is not valid. Windows 2000 and Windows NT: This error constant is not available. |
|
WBEM_E_AMBIGUOUS_OPERATION |
Operation was ambiguous. Windows 2000 and Windows NT: This error constant is not available. |
|
WBEM_E_QUOTA_VIOLATION |
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 |
Operation resulted in a transaction conflict. Windows 2000 and Windows NT: This error constant is not available. |
|
WBEM_E_FORCED_ROLLBACK |
Transaction forced a rollback. Windows 2000 and Windows NT: This error constant is not available. |
|
WBEM_E_UNSUPPORTED_LOCALE |
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 |
Object handle is out-of-date. Windows 2000 and Windows NT: This error constant is not available. |
|
WBEM_E_CONNECTION_FAILED |
Connection to the SQL database failed. Windows 2000 and Windows NT: This error constant is not available. |
|
WBEM_E_INVALID_HANDLE_REQUEST |
Handle request was invalid. Windows 2000 and Windows NT: This error constant is not available. |
|
WBEM_E_PROPERTY_NAME_TOO_WIDE |
Property name contains more than 255 characters. Windows 2000 and Windows NT: This error constant is not available. |
|
WBEM_E_CLASS_NAME_TOO_WIDE |
Class name contains more than 255 characters. Windows 2000 and Windows NT: This error constant is not available. |
|
WBEM_E_METHOD_NAME_TOO_WIDE |
Method name contains more than 255 characters. Windows 2000 and Windows NT: This error constant is not available. |
|
WBEM_E_QUALIFIER_NAME_TOO_WIDE |
Qualifier name contains more than 255 characters. Windows 2000 and Windows NT: This error constant is not available. |
|
WBEM_E_RERUN_COMMAND |
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 |
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 |
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 |
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 |
Specified locale identifier was invalid for the operation. Windows 2000 and Windows NT: This error constant is not available. |
|
WBEM_E_PROVIDER_SUSPENDED |
Provider is suspended. Windows 2000 and Windows NT: This error constant is not available. |
|
WBEM_E_SYNCHRONIZATION_REQUIRED |
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 |
Operation cannot be completed; no schema is available. Windows 2000 and Windows NT: This error constant is not available. |
|
WBEM_E_PROVIDER_ALREADY_REGISTERED |
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 |
Provider was not registered. Windows 2000 and Windows NT: This error constant is not available. |
|
WBEM_E_FATAL_TRANSPORT_ERROR |
Fatal transport error occurred. Windows 2000 and Windows NT: This error constant is not available. |
|
WBEM_E_ENCRYPTED_CONNECTION_REQUIRED |
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 |
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 |
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 |
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 |
Provider registration overlaps with the system event domain. |
|
WBEMESS_E_REGISTRATION_TOO_PRECISE |
A WITHIN clause was not used in this query. |
|
WBEMESS_E_AUTHZ_NOT_PRIVILEGED |
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 |
Reserved for future use. |
|
WBEM_E_RESOURCE_CONTENTION |
Reserved for future use. |
|
WBEMMOF_E_EXPECTED_QUALIFIER_NAME |
Expected a qualifier name. |
|
WBEMMOF_E_EXPECTED_SEMI |
Expected semicolon or '='. |
|
WBEMMOF_E_EXPECTED_OPEN_BRACE |
Expected an opening brace. |
|
WBEMMOF_E_EXPECTED_CLOSE_BRACE |
Missing closing brace or an illegal array element. |
|
WBEMMOF_E_EXPECTED_CLOSE_BRACKET |
Expected a closing bracket. |
|
WBEMMOF_E_EXPECTED_CLOSE_PAREN |
Expected closing parenthesis. |
|
WBEMMOF_E_ILLEGAL_CONSTANT_VALUE |
Numeric value out of range or strings without quotes. |
|
WBEMMOF_E_EXPECTED_TYPE_IDENTIFIER |
Expected a type identifier. |
|
WBEMMOF_E_EXPECTED_OPEN_PAREN |
Expected an open parenthesis. |
|
WBEMMOF_E_UNRECOGNIZED_TOKEN |
Unexpected token in the file. |
|
WBEMMOF_E_UNRECOGNIZED_TYPE |
Unrecognized or unsupported type identifier. |
|
WBEMMOF_E_EXPECTED_PROPERTY_NAME |
Expected property or method name. |
|
WBEMMOF_E_TYPEDEF_NOT_SUPPORTED |
Typedefs and enumerated types are not supported. |
|
WBEMMOF_E_UNEXPECTED_ALIAS |
Only a reference to a class object can have an alias value. |
|
WBEMMOF_E_UNEXPECTED_ARRAY_INIT |
Unexpected array initialization. Arrays must be declared with []. |
|
WBEMMOF_E_INVALID_AMENDMENT_SYNTAX |
Invalid namespace path syntax. |
|
WBEMMOF_E_INVALID_DUPLICATE_AMENDMENT |
Duplicate amendment specifiers. |
|
WBEMMOF_E_INVALID_PRAGMA |
#pragma must be followed by a valid keyword. |
|
WBEMMOF_E_INVALID_NAMESPACE_SYNTAX |
Invalid namespace path syntax. |
|
WBEMMOF_E_EXPECTED_CLASS_NAME |
Unexpected character in class name must be an identifier. |
|
WBEMMOF_E_TYPE_MISMATCH |
The value specified cannot be made into the appropriate type. |
|
WBEMMOF_E_EXPECTED_ALIAS_NAME |
Dollar sign must be followed by an alias name as an identifier. |
|
WBEMMOF_E_INVALID_CLASS_DECLARATION |
Invalid class declaration. |
|
WBEMMOF_E_INVALID_INSTANCE_DECLARATION |
The instance declaration is invalid. It must start with "instance of" |
|
WBEMMOF_E_EXPECTED_DOLLAR |
Expected dollar sign. An alias in the form "$name" must follow the "as" keyword. |
|
WBEMMOF_E_CIMTYPE_QUALIFIER |
"CIMTYPE" qualifier cannot be specified directly in a MOF file. Use standard type notation. |
|
WBEMMOF_E_DUPLICATE_PROPERTY |
Duplicate property name was found in the MOF. |
|
WBEMMOF_E_INVALID_NAMESPACE_SPECIFICATION |
Invalid namespace syntax. References to other servers are not allowed. |
|
WBEMMOF_E_OUT_OF_RANGE |
Value out of range. |
|
WBEMMOF_E_INVALID_FILE |
The file is not a valid text MOF file or binary MOF file. |
|
WBEMMOF_E_ALIASES_IN_EMBEDDED |
Embedded objects cannot be aliases. |
|
WBEMMOF_E_NULL_ARRAY_ELEM |
NULL elements in an array are not supported. |
|
WBEMMOF_E_DUPLICATE_QUALIFIER |
Qualifier was used more than once on the object. |
|
WBEMMOF_E_EXPECTED_FLAVOR_TYPE |
Expected a flavor type such as ToInstance, ToSubClass, EnableOverride, or DisableOverride. |
|
WBEMMOF_E_INCOMPATIBLE_FLAVOR_TYPES |
Combining EnableOverride and DisableOverride on same qualifier is not legal. |
|
WBEMMOF_E_MULTIPLE_ALIASES |
An alias cannot be used twice. |
|
WBEMMOF_E_INCOMPATIBLE_FLAVOR_TYPES2 |
Combining Restricted, and ToInstance or ToSubClass is not legal. |
|
WBEMMOF_E_NO_ARRAYS_RETURNED |
Methods cannot return array values. |
|
WBEMMOF_E_MUST_BE_IN_OR_OUT |
Arguments must have an In or Out qualifier. |
|
WBEMMOF_E_INVALID_FLAGS_SYNTAX |
Invalid flags syntax. |
|
WBEMMOF_E_EXPECTED_BRACE_OR_BAD_TYPE |
The final brace and semi-colon for a class are missing. |
|
WBEMMOF_E_UNSUPPORTED_CIMV22_QUAL_VALUE |
A CIM version 2.2 feature is not supported for a qualifier value. |
|
WBEMMOF_E_UNSUPPORTED_CIMV22_DATA_TYPE |
The CIM version 2.2 data type is not supported. |
|
WBEMMOF_E_INVALID_DELETEINSTANCE_SYNTAX |
Invalid delete instance syntax. It should be #pragma DeleteInstance("instancepath", FAIL|NOFAIL) |
|
WBEMMOF_E_INVALID_QUALIFIER_SYNTAX |
Invalid qualifier syntax. It should be qualifiername:type=value,scope(class|instance), flavorname. |
|
WBEMMOF_E_QUALIFIER_USED_OUTSIDE_SCOPE |
The qualifier is used outside of its scope. |
|
WBEMMOF_E_ERROR_CREATING_TEMP_FILE |
Error creating temporary file. The temporary file is an intermediate stage in the MOF compilation. |
|
WBEMMOF_E_ERROR_INVALID_INCLUDE_FILE |
A file included in the MOF by the preprocessor command #include is invalid. |
|
WBEMMOF_E_INVALID_DELETECLASS_SYNTAX |
The syntax for the preprocessor commands #pragma deleteinstance or #pragma deleteclass is not valid. |
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 tha |
|
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. |
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.
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