Connecting to remote serve failed with error: WinRM cannot process the request.

Teemo Tang 11,366 Reputation points
2020-07-15T06:56:36.047+00:00

Hi Experts

I am getting the below error when i am trying to execute a powershell script. i am trying to install a software on 20 servers and on all 20 servers i have local admin rights.
Invoke-command -ComputerName (get-content c:\list.txt) -filepath C:\soft.ps1

Connecting to remote server server01 failed with the following error message : WinRM cannot
process the request.

I am executing the powershell script from myjumpserver01 i have local admin rights on this server.
list.txt file contains server names in the below format
server01.contoso.com
server02.contoso.com

Experts guide me on this

source link: https://social.technet.microsoft.com/Forums/windows/en-US/27e02632-1ded-4b62-9f38-2342d6ac85ef/connecting-to-remote-serve-failed-with-error-winrm-cannot-process-the-request?forum=ws2016

Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,425 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jenny Feng 14,096 Reputation points
    2020-07-15T07:33:39.293+00:00

    Welcome to our new Microsoft Q&A Platform.

    1.If we run below command in command prompt (ran as admin)on myjumpserver01 ,will all 20 servers in trust list on myjumpserver01,can you check it?
    Get-Item WSMan:\localhost\Client\TrustedHosts
    For adding the remote server to trustshots like this
    winrm set winrm/config/client '@{TrustedHosts="192.168.2.54,192.168.2.59"} '

    2.there is a document for your reference
    Remote Management with Server Manager
    http://www.tuncaysahin.nl/remote-management-with-server-manager/

    0 comments No comments

0 additional answers

Sort by: Most helpful