Kasraeian

vWorld v.3

Server Manager & WinRM

During my lab time, I tried to add Windows Server 2012 to the “Server Manager” which I installed on my Windows 8 system for remote management purpose.
SM&WinRM-01 SM&WinRM-02 SM&WinRM-03 SM&WinRM-04
As it’s shown in above screenshots, it’s a simple process, it’s only needed to click on “Manage” button in the server manager window, then choosing the “Add Servers” item; new windows would be open which let user to select different method for adding servers, I selected DNS option and provided the server name, select that and pressed OK button. up to now everything is simple and straight forward, but if the client don’t know the remote server then it’ll generate some error like bellow image.

SM&WinRM-05

The error would be “WinRM Negotiate authentication error”, and if searching for it over internet, some article stated the reason as the remote server might not be listed in the “TrustedHosts” list.

In order to check the current “TrustedHosts” using bellow code might help; It’s possible to use just first portion of code (before first pipe) but it’ll bring some info which might not be needed so I tried to show only needed part.

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

Running above code in PowerShell should generate data like bellow image.

SM&WinRM-06

For adding target remote server, it’s needed to replace “Set” and “Get” word and provide two more parameters without any piping, like bellow

[crayon]Set-Item WSMan:\localhost\Client\TrustedHosts -Value “server1,server1.domain,server2,server2.domain” -Concatenate -Force[/crayon]

Above code would add remote servers to currently existed list, if “-Concatenate” parameter used, the whole existing list would be replaced by newly provided server list.

I used bellow line as shown in the image as well

[crayon]Set-Item WSMan:\localhost\Client\TrustedHosts -Value “dc,dc.poddcs.net” -Concatenate -Force[/crayon]

SM&WinRM-07

If above code entered in the normal (user mode) PowerShell Window, it will return an error of “Access is denied”, so run this code in the “Administrator” mode by right-clicking on the PowerShell icon and selecting “Run as Administrator”; after running this code, check the “TrustedHosts” list again as it should be changed containing current server names.

SM&WinRM-08 SM&WinRM-09

Now the remote server added in “TrustedHosts” list, it’s time to refresh the list on Server Manager or re-adding servers

SM&WinRM-10

Server(s) should be Online in the list, but if their “Authentication” information is not provided before or not same as user who running the Server Manager, “Access denied” message would be shown up. for solving this part, right-click on the server and select “Manage As …” option; this will bring new window for providing username and password for user with efficient access permission and by pressing enter button at the bottom of window, it’ll try to reconnect to remote server by new authentication information.

SM&WinRM-11 SM&WinRM-12 SM&WinRM-13 SM&WinRM-14

3 Comments

Add a Comment
  1. I was struggling with getting things working in my environment because I’m using a workgroup and not a domain. Your instructions worked most excellent. I think I was missing adding both servername, and servername.workgroupname. Either way, thank you.

    1. Your welcome, I’m glad this post helps

It's your kindness to leave a reply/feedback

Kasraeian © 2016
%d bloggers like this: