Thursday, January 2, 2014

Enable RDP through PSexec

Quick and simple way to enable Remote Desktop (RDP) via psexec

1.

Install PSEXEC

PSEXEC is a standalone executable file that allows you to run commands on remote machines.
You can download the tool from here:
http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
2.


Run psexec

You can add the location of psexec to your %PATH% variable or simple copy the "psexec" to "C:\WINDOWS\System32\" folder.
After that simply open a command line and type "psexec /?" to test its functioning accordingly

3.

Enable RDP

Open a command line and type the follwoing:
psexec \\machinename reg add "hklm\system\currentcontrolset\control\terminal server" /f /v fDenyTSConnections /t REG_DWORD /d 0
This adds a registry entry enabling RDP connections.

4.

Configure Machine Firewall to allow RDP

Open a command line and type the following
psexec \\remotecomputername netsh firewall set service remoteadmin enable
psexec \\remotecomputername netsh firewall set service remotedesktop enable

No comments:

Post a Comment