Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Enable Terminal Service ConnectionsContent of Enable Terminal Service Connections.vbsMD5 Hash: 2F5F35E36891CF21372B473B6B731A5A |
||
' Description: Enables Terminal Services connections on a computer running Terminal Services. To disable connections, pass the value 0 (rather than 1) to the SetAllowTSConnections method.
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 | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |