PowerShell – Log Off and Shutdown
Use WMI in PowerShell to control log off and shutdown. Useful for when logoff.exe or shutdown.exe will not work (as in virtual sessions). 0 – Logoff 1 – Shutdown 2 – Reboot 4 – Forced logoff 5 – Forced shutdown 6 – Forced reboot 8 – Power off 12 – Forced power off Read More …