Script to Enable Remote Desktop
Remote Desktop is disabled when installing Windows XP or Windows 2003. To enable this feature you can:
- Use the UI. Right-Click on My Computer and select Properties. Enable Remote Desktop on the Remote Tab.
- Use the simple script below
VBScript Example
'
' -------------------------------------------------
' Turns on Remote Desktop setting
'
' NOTE: Does not configure firewall
'
machine = "."
cimv2_string = "WINMGMTS:" & "\\" & machine & "\root\cimv2"
query = "select * from Win32_TerminalServiceSetting"
value_to_set = 1 ' 0=off, 1=on
set cimv2 = GetObject( cimv2_string )
set items = cimv2.ExecQuery( query )
for each item in items
item.SetAllowTSConnections( value_to_set )
next
' -------------------------------------------------