Monday, January 19, 2009

log-off, shut-down, re-boot system

[] to logoff current session

PS> (Get-WmiObject -Class Win32_OperatingSystem -ComputerName .).Win32Shutdown(0)


[] to shut down the computer

PS> (Get-WmiObject -Class Win32_OperatingSystem -ComputerName .).Win32Shutdown(1)


[] to reboot the operating system

PS> (Get-WmiObject -Class Win32_OperatingSystem -ComputerName .).Win32Shutdown(2)

No comments:

Post a Comment