[DllImport("wtsapi32.dll", SetLastError = true)] public static extern bool WTSLogoffSession( IntPtr hServer, int SessionId, bool bWait );
Microsoft documentation: Link
Last updated 1 year ago