I have a headless Windows Server 2012R2 box which recently moved to a new physical network at a new site.

In setting everything back up I discovered that its hostname was not resolving and I could not RDP into the box, even by IP address. After some troubleshooting I determined that the new network had been auto-configured as a public network, and the Windows firewall defaults for public networks do not allow RDP.

I don't have any way to hook a monitor up to the server at this time. How can I enable RDP from another computer on the network? I am not using an AD domain, though I know the administrator password for the server.


The Microsoft tool PsExec is the solution to this problem. It uses RPC to control remote computers, which is allowed by default for public networks by the Windows Firewall.

Once you have PsExec set up, use the command

psexec \\SERVER_IP_ADDRESS -user SOME_ADMIN_ACCOUNT powershell "Get-NetConnectionProfile"

to find the InterfaceIndex of the network connection which is miscatagorized. Note that psexec can take 30 seconds or so to execute.

Once you have the InterfaceIndex, run this command to change the network type:

psexec \\SERVER_IP_ADDRESS -user SOME_ADMIN_ACCOUNT powershell "Set-NetConnectionProfile -InterfaceIndex INDEX_FROM_LAST_COMMAND -NetworkCategory Private"

Once this command executes successfully the network type will become private and you will be able to RDP into the server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.