WTSLogoffSession

[DllImport("wtsapi32.dll", SetLastError = true)]
public static extern bool WTSLogoffSession(
   IntPtr hServer,
   int SessionId,
   bool bWait
);

Microsoft documentation: Link

Last updated