Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Modify Terminal Services Broken Connection SettingsContent of Modify Terminal Services Broken Connection Settings.vbsMD5 Hash: 56AAA0F09F3A05DB42A9A386C26C2DAA |
||
' Description: Configures Terminal Services to permanently delete a session in case of a broken connection. To configure Terminal Services to merely disconnect the user from the session instead, pass the value 0 (instead of 1) to the BrokenConnection method.
Const DISCONNECT_USER = 1 strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_TSSessionSetting") For Each objItem in colItems errResult = objItem.BrokenConnection(DISCONNECT_USER) Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |