Test-WSMan fails with 2150859027

Liju Varghese 1 Reputation point Microsoft Employee
2022-04-07T21:40:30.017+00:00

Running the command Test-WSMan -ComputerName LitwareRootMS02.Litware.com from another machine returns the following error:

Test-WSMan :
<f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2150859027" Machine="LitwareRootMS01.Litware.com">
<f:Message>The WinRM client sent a request to an HTTP server and got a response saying the requested HTTP URL was not available. This is usually returned by a HTTP server that does not support the WS-Management protocol. </f:Message></f:WSManFault>
At line:1 char:1

  • Test-WSMan -ComputerName LitwareRootMS02.Litware.com
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : InvalidOperation: (LitwareRootMS02.Litware.com:String) [Test-WSMan], InvalidOperationException
  • FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.TestWSManCommand

On LitwareRootMS02, the Microsoft-Windows-WinRM/Analytic event log (if enabled) will contain the event:

Log Name: Microsoft-Windows-WinRM/Analytic
Source: Microsoft-Windows-WinRM
Date: 4/7/2022 5:17:10 PM
Event ID: 1048
Task Category: Response handling
Level: Error
Keywords: Server
User: NETWORK SERVICE
Computer: LitwareRootMS02.Litware.com
Description:
Sending HTTP error back to the client due to a transport failure.
The HTTP status code is 404
The error code is 1168

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,455 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Liju Varghese 1 Reputation point Microsoft Employee
    2022-04-07T21:51:08.317+00:00

    The GPO setting Allow remote server management through WinRM was enabled and the IPv4 filter configured with an ip range (not "*")

    Found out that:

    • The IPv4 and IPv6 filters cannot contain a single ip address, it must contain a range. If not, you will see an event like the one below:

    Log Name: System
    Source: Microsoft-Windows-WinRM
    Date: 4/7/2022 5:12:45 PM
    Event ID: 10131
    Task Category: None
    Level: Error
    Keywords: Classic
    User: N/A
    Computer: LitwareRootMS02.Litware.com
    Description:
    The IP Range 10.100.10.5 is invalid and it will be ignored.
    Ranges are specified using the syntax IP1-IP2. Multiple ranges are separated using "," as delimiter.
    Example IPv4 ranges: 2.0.0.1-2.0.0.20, 24.0.0.1-24.0.0.22
    Example IPv6 ranges: 3FFE:FFFF:7654:FEDA:1245:BA98:0000:0000-3FFE:FFFF:7654:FEDA:1245:BA98:3210:4562
    User Action
    Correct the IP filter 10.100.10.5 using the syntax described above.

    • The filter is supposed to contain the IP addresses the machine being managed should listen for requests on. And not the ip addresses of the management server(s) making the connection.
    0 comments No comments