So, after delivering a new server to a client and getting it setup on the network, joining the domain and configuring the nightly backup, I decide to take off and finish the rest of the tasks remotely. Not until I drive back to the office and attempt to log in do I realize I had forgotten to enable remote desktop. This is not the first time this has happened, nor will it probably be the last. I decided to write up this how-to in case others wind up with the same issue.
Enabling Remote Desktop through the registry:
This particular client I dropped the server off to had other servers on site which did have remote desktop enabled. I logged into one of those servers to perform the following:
- Launch registry editor then: Start – Run – Regedit
- Click on File – Connect Network Registry
- The Select Computer screen appears then: Either type the name or IP address or click the Advanced, and then Find Now buttons
- The remote computer will show up at the bottom of registry editor:
- In the right window pane, locate fDenyTSConnections and modify it by changing the “1” to a “0”
- After changing the value, right-click the remote computer on the left side and choose “Disconnect” and then close registry editor.
Underneath the remote computer, expand to HKLMSYSTEMCurrentControlSetControlTerminalServer
Now the remote computer will need to be rebooted. If you need to know how to do this, follow these steps.
Rebooting a computer remotely
You can reboot a computer or server remotely from the command line or through computer management.
From the command line:
- Click Start – Run – CMD and hit Enter
- From the command prompt type:
- Shutdown – m \hostname –r
- If you receive an error that the workstation is in use and has been locked, you can force a shutdown by typing:
- Shutdown –m \hostname –r –f
- Be careful with the above command as it will force running applications to terminate.
From Computer Management:
- Open Computer Management by right-clicking on the My Computer icon and choosing “Manage”
- Click on “Action” and then “Connect to another computer”
- Type the name or IP address or click on Browse to find it and click “OK” then you should see the remote computer name next to “Computer Management”
- Right-click on the computer name and choose “Properties”
- Click on the Advanced tab
- Underneath Startup and Recovery click the “Settings” button
- At the very bottom, click the “Shutdown” button which will bring up shutdown options.
- Underneath Action, choose “Restart”
- As in the force command from the command line option, if you receive an error, you can try again and choose the “If Hung” option underneath Force Apps Closed
- Click OK and the server will reboot
After the server has rebooted, Remote Desktop (Terminal Services) should be up and running and accepting connections.