@depends(_HAS_WIN32TS_DEPENDENCIES)
def logoff_session(session_id):
    try:
        win32ts.WTSLogoffSession(win32ts.WTS_CURRENT_SERVER_HANDLE, session_id, True)
    except PyWinError as error:
        _LOG.error('Error calling WTSLogoffSession: %s', error)
        return False
    return True
Initiate the logoff of a session.
dataset/ETHPy150Open saltstack/salt/salt/modules/rdp.py/logoff_session