Setup and connect to WinRM to manage remote servers

 

 

Setup and connect to WinRM to manage remote servers

To enable remote management In Powershell run: winrm qc

 

Then:

Step 1 – Check TrustedHosts

On the server where you want to manage remote machines from (so the client), please run the following command in a privileged PowerShell session:

 

Get-Item WSMan:\localhost\Client\TrustedHosts | select name,value | format-list

 

This command show return an empty list, or a list that does not contain the server you want to manage.

 

Step 2 – Add Server to TrustedHosts

On the server you want to manage remote machines from, please run the following command in a privileged PowerShell session:

 

Set-Item wsman:\localhost\Client\TrustedHosts "computer_name" -Concatenate -Force

 

If you run the command at step 1, you should now see a new addition to the list.

 

Step 3 – Store Remote Server Credentials

Using CMDKEY, on the server where you want to manage remote machines from, perform the following command, for each server you want to remotely manage:

 

cmdkey /add:computer_name /user:Administrator /pass:Password

 

The last step, on the managing server, using Server Manager, right click the entry that was throwing errors and click remove. Now try to add the target server one more time, and it should give you a successful result (it should say Online under Manageability)

WinRM Negotiate authentication error:

 

I received the error message “WinRM Negotiate authentication error” on my home lab, workgroup based systems while testing the Windows 2012 R2 Server Manager connection to remote systems. See below:

 

If you’re looking at this post you may have done this to setup the connection:


Solution:

 

Step 2 & 3, make sure you use the full server name including workgroup name. Then you will successfully be able to add the remote server in Server Manager for remote management. Here is an example:

 

 

From <https://itsystemsadmin.wordpress.com/2014/12/05/winrm-negotiate-authentication-error/>

 

From <https://virtualization.ro/2019/08/16/windows-server-2016-winrm-negotiate-authentication-error/>

 

 

 

Created with OneNote.

No comments:

Post a Comment

Removing tiered storage spaces - Windows Server 2022

As part of the work I have done in my homelab with tiered storage on Server 2022 storage spaces , here is a script I created that allows you...