Anleitungen, HowTo's, Tipps, Tricks für Administratoren

Schlagwort-Archiv: Powershell logoff user

Hi, i want to show you a simple way to logout any user on a server or Computer.

PowerShell

1

(Get-WmiObject-ClassWin32_OperatingSystem).Win32Shutdown(0)# 0 Is a Flag

Source: MSDN – Win32Shutdown method of the Win32_OperatingSystem class Flags to Logoff User with WMI and Powershell Bitmapped set of flags to shut the computer down. To force a command, add the Force flag (4) to the …