/// <summary> /// Connects to the Terminal Server and KILLS all terminals. /// </summary> /// <param name="tsHost">TS host IP address</param> /// <param name="tsPort">TS port number</param> /// <returns>>true - success, all terminals have been killed; false - failure</returns> public static bool KillTerminals(string tsHost, int tsPort) { var cli = new TerminalClient("TERMS_KILLER", tsHost, tsPort); try { return(cli.KillTerminals()); } finally { cli.Close(); } }
/// <summary> /// Connects to the Terminal Server and returns a list of available SRV configuration files. /// </summary> /// <param name="terminalHost">TS host IP address</param> /// <param name="terminalPort">TS port number</param> /// <returns>list of SRV file names</returns> public static List <String> GetAvailableSrvFiles(string terminalHost, int terminalPort) { var cli = new TerminalClient("SRV_GETTER", terminalHost, terminalPort); try { return(cli.GetAvailableSrvFiles()); } finally { cli.Close(); } }
/// <summary> /// Connects to the Terminal Server and returns its box ID. /// </summary> /// <param name="terminalHost">TS host IP address</param> /// <param name="terminalPort">TS port number</param> /// <returns>Terminal Server's BOXID</returns> public static ulong GetBoxID(string terminalHost, int terminalPort) { var cli = new TerminalClient("SRV_GETTER", terminalHost, terminalPort); try { return(cli.GetBoxID()); } finally { cli.Close(); } }