Wednesday, August 8, 2012

How to enable remoting in a windows server 2012 core

From a command line on the server machine enter
winrm qc
Press y to continue
If the server is not a domain member you can remotely manage it from a workstation adding workstation's ip in wsman trusted hosts using the command:
winrm set winrm/config/client @{TrustedHosts="x.x.x.x"}
where x.x.x.x is the IP address or the computer name of the workstation machine
In the workstation machine enable winrm using the command
winrm qc
and
winrm set winrm/config/client @{TrustedHosts="x.x.x.x"}
where x.x.x.x is the IP address or the computer name of the server machine
After that you can connect to the remote machine using the command
winrs -r:http://x.x.x.x:5985 -u:username "command"
where x.x.x.x is the IP address or the computer name of the server machine, username a user with admin persmissions on the server machine and command the command to execute on the server machine.
Example:
winrs -r:http://192.168.10.10:5985 -u:Administrator "cmd"
For more information take a look at the following post

No comments:

Post a Comment