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:

 


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:

 

Server Name 
TESTBED 
TESTMACHINE 
IPv4 Address 
192.168.1.8 
192.168.1.12.192.168.1.9 Online 
Manageability 
Online • Performance counters not started 
• Performance counters not started 
Last Update 
12/4/2014 PM 
12/4/2014 92206 PM 
Windows Activation 
00252-90000-00000-AA632 (Activated) 
00252- IOOOO-OOOOO-AA228 (Activated) 
events | 10 total 
TASKS 
p 
Source 
Windows Securi 
Enter User Account and Password 
Enter the name and password of an account with user rights on the 
selected servers. 
For example, user, user@example.contoso.com. or domain\user name. 
Entering a blank user name and password deletes cached credentials. 
testmachine.home\administrator 
Filter 
Sewer Name 
TESTMACHINE 
TESTMACHINE 
TESTMACHINE 
TESTMACHINE 
TESTMACHINE 
TESTMACHINE 
TESTMACHINE 
ID 
10149 
1014 
10149 
1014 
1014 
16949 
1014 
Seve rity 
Waming 
Waming 
Waming 
Waming 
Warning 
Warning 
Warnina 
Microsoft- Wind Ows -W 
Microsoft- Wind Ows - D 
Remember my credentials 
Microsoft- Wind Ows -W 
Microsoft- Wind Ows - D 
Microsoft- Wind Ows - D 
Microsoft- Windows - MsLbfoSys EvtP ro vider 
Microsoft-Wandows-DNS Client Events 
Winrs 
System 
Svstem 
12/3/2014 PM 
12/3/2014 1000:47 PM 
PS C: set-item testmachine.home 
PS C: get-item wsman: 
WSManConfig: Microsoft. WSMan.Management\wSMan: : localhost\C1ient 
—concatenate 
-force 
ype 
system. string 
Name 
TrustedHosts 
SourceOfVa1 u e Val ue 
testmachi ne , testmachi ne. home

 

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

 

 

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