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.
September 5, 2006
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
You May Also Like