Enabling RDP Remotely

Need remote access and forgot to turn RDP access on? Argh, how to get to that server (or workstation)?

PSExec comes to the rescue in four easy steps! PsExec is a light-weight telnet-replacement that lets you execute processes on other systems, complete with full interactivity for console applications, without having to manually install client software. For those of you not familiar with Sysinternals I highly recommend you check out the suite of tools freely available from Microsoft – https://technet.microsoft.com/en-us/sysinternals/default

  1. Download PSExec –  http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
  2. Copy to your Windows System 32 folder. This way its always available straight up when you fire up an administrative command prompt – c:\windows\system32
  3. Open a command line and type the following command (ensure you swap out ‘remote-machine-name’ for the hostname of your remote server):
    psexec \\remote-machine-name reg add "hklm\system\currentcontrolset\control\terminal server" /f /v fDenyTSConnections /t REG_DWORD /d 0<span id="mce_marker" data-mce-type="bookmark" data-mce-fragment="1">​</span>

    This command adds a registry entry that enables RDP connections.

  4. Still in the command line enter the following commands, again swapping out ‘remote-machine-name’ for the hostname of your remote server:
    psexec \\remote-machine-name netsh firewall set service remoteadmin enable 
    psexec \\remote-machine-name netsh firewall set service remotedesktop enable<span id="mce_marker" data-mce-type="bookmark" data-mce-fragment="1">​</span>

    These commands set the firewall to enable remote administration and then allows remote desktop connections through the firewall.

And that’s it. You should now have remote access to that server (or workstation).


Leave a Reply

Skip to toolbar