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

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 off
setlocal
if \{%1\}

\{\} goto syntax :loop if \{%1\}

\{\} goto finish set comp=%1 set remote="\\%1\HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" shift reg.exe ADD %remote% /v fDenyTSConnections /t REG_DWORD /d 0 /f>nul 2>&1 if NOT %ERRORLEVEL% EQU 0 @echo %remote% NOT found. shutdown -m \\%comp% -r goto loop :syntax @echo Syntax: RmtDsktop Computer1 \[Computer2 .... Computern\] goto loop :finish endlocal

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish