WinRM cannot complete the operation during open the exchange management shell

Sajid Azeem 1 Reputation point
2020-08-12T22:02:29.45+00:00

Hi Al,,

i am facing the below error.

Connecting to remote server test.contoso.com failed with the
following error message : WinRM cannot complete the operation. Verify that the specified computer name is valid, that
the computer is accessible over the network, and that a firewall exception for the WinRM service is enabled and allows
access from this computer. By default, the WinRM firewall exception for public profiles limits access to remote
computers within the same local subnet. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1

  • New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Micr ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
    gTransportException
  • FullyQualifiedErrorId : WinRMOperationTimeout,PSSessionOpenFailed

i have already check the netsh proxy, winRM service is running, firewal is off, time is sync. but unable to resolve.

Kindly guide to resolve the issue.

Regards

Muhammad Sajid Azeem

Exchange | Exchange Server | Management
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Kael Yao 37,746 Reputation points Moderator
    2020-08-13T07:59:49.827+00:00

    Hi, Muhammad.
    Based on your description, did you check the netsh proxy via the netsh winhttp show proxy command?
    Just to confirm, It should show Direct Access (No proxy server).

    Please run winrm quickconfig to see if it returns the following information:

    WinRM service is already running on this machine.
    WinRM is not set up to allow remote access to this machine for management.
    

    If so, follow the guide to make the changes and have WinRM configured automatically.
    And then check if EMS can work fine.

    Besides, is there any anti-virus software installed on your Exchange server?
    If there is, please uninstall them and see if the problem persists.

    If the suggestions above didn’t help with your problem, please answer the following questions:
    1.Which version of Exchange server are you using? Is it a brand new install?
    2.Are there other Exchange Servers or DAGs in your environment? Can EMS be opened correctly on other servers?


  2. Mahantesh Desai 6 Reputation points
    2021-07-07T09:46:32.157+00:00

    I have an Azure pipeline trying to execute powershell on remote server on azure cloud. The VM is put behind the Load balancer. So pipeline is failing to execute powershell script on the server with error message given below.

    [error]Unable to create pssession. Error: 'Connecting to remote server failed with the following error message : WinRM cannot complete the operation. Verify that the specified computer name is valid, that the computer is accessible over the network, and that a firewall exception for the WinRM service is enabled and allows access from this computer. By default, the WinRM firewall exception for public profiles limits access to remote computers within the same local subnet. For more information, see the about_Remote_Troubleshooting Help topic.'

    2021-07-06T13:00:05.0139918Z ##[error]The remote session query failed for 20...16 with the following error message: WinRM cannot complete the operation. Verify that the specified computer name is valid, that the computer is accessible over the network, and that a firewall exception for the WinRM service is enabled and allows access from this computer. By default, the WinRM firewall exception for public profiles limits access to remote computers within the same local subnet.

    0 comments No comments

  3. Robin Poulose 1 Reputation point
    2021-12-16T14:43:52.617+00:00
    0 comments No comments

  4. Robin Poulose 1 Reputation point
    2021-12-16T14:46:45.383+00:00
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.