‎05-08-2011 12:57 AM
‎02-06-2014 09:57 PM
‎05-12-2011 08:41 PM
‎05-12-2011 11:15 AM
@echo off
FOR /f "tokens=3 skip=2" %%i IN ('reg query "\\%1\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections') DO (set dword=%%i)
echo %DWORD%
if %DWORD%==0x0 goto OFF
goto ON
:ON
reg add "\\%1\HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /f /v fDenyTSConnections /t REG_DWORD /d 0
echo.
echo RDP on host %1 activated
goto EOF
:OFF
reg add "\\%1\HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /f /v fDenyTSConnections /t REG_DWORD /d 1
echo.
echo RDP on host %1 de-activated
goto EOF
:EOF
echo.
echo.
echo press any key
pause>NUL
exit
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now