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
- Download PSExec – http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
- 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
- Open a command line and type the following command (ensure you swap out ‘remote-machine-name’ for the hostname of your remote server):PowerShell1psexec \\remote-machine-name reg add "hklm\system\currentcontrolset\control\terminal server" /f /v fDenyTSConnections /t REG_DWORD /d 0
This command adds a registry entry that enables RDP connections.
- Still in the command line enter the following commands, again swapping out ‘remote-machine-name’ for the hostname of your remote server:PowerShell12psexec \\remote-machine-name netsh firewall set service remoteadmin enablepsexec \\remote-machine-name netsh firewall set service remotedesktop enable
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).