Q. How can I remotely enable Remote Desktop on Windows Server 2003 using the registry?

Jerold Schulman

September 5, 2006

1 Min Read
ITPro Today logo in a gray background | ITPro Today

I have scripted RmtDsktop.bat to enable Remote Desktop on a remote Windows Server 2003.

The syntax for using RmtDsktop.bat is:

RmtDsktop ComputerName1 [ComputerName2 .... ComputerNamen]

Where ComputerNameX is the NetBIOS computer name of the remote Windows Server 2003.

NOTE: RmtDsktop.bat will restart the remote Windows Server 2003 computer.

RmtDsktop.bat contains:

@echo offsetlocalif {%1}
{} goto syntax:loopif {%1}
{} goto finishset comp=%1set remote="\%1HKLMSYSTEMCurrentControlSetControlTerminal Server"shiftreg.exe ADD %remote% /v fDenyTSConnections /t REG_DWORD /d 0 /f>nul 2>&1if NOT %ERRORLEVEL% EQU 0 @echo %remote% NOT found.shutdown -m \%comp% -rgoto loop:syntax@echo Syntax: RmtDsktop Computer1 [Computer2 .... Computern]goto loop:finishendlocal


Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like