Enable RDP Access
Quick script to enable RDP sessions on a computer
1 2 3 4 5 6 7 8 9 10 |
Const ENABLE_CONNECTIONS = 1 strComputer = "." Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_TerminalServiceSetting") For Each objItem in colItems errResult = objItem.SetAllowTSConnections(ENABLE_CONNECTIONS) Next |
I have done this in the past via remote registry. In those cases, it required a reboot of the PC. Do you know whether your method above requires the PC to be rebooted before taking effect?
Thanks,
–
Doug