# encoding: ascii
# api: powershell
# title: Invoke-Standby
# description: Collection of functions to Shutdown, Reboot, Logoff, Standby(sleep) or Hibernate your computer.
# version: 0.1
# type: function
# author: TJdot
# license: CC0
# function: Invoke-Shutdown
# x-poshcode-id: 2280
# x-archived: 2015-07-20T23:13:45
# x-published: 2011-10-04T12:37:00
#
#Autor: Mateusz Świetlicki
#Site: mateusz.swietlicki.net
#Create: 2010-10-04
function Invoke-Shutdown
{
&"$env:SystemRoot\System32\shutdown.exe" -s
}
function Invoke-Reboot
{
&"$env:SystemRoot\System32\shutdown.exe" -r
}
function Invoke-Logoff
{
&"$env:SystemRoot\System32\shutdown.exe" -l
}
Set-Alias lg Invoke-Logoff
function Invoke-Standby
{
&"$env:SystemRoot\System32\rundll32.exe" powrprof.dll,SetSuspendState Standby
}
Set-Alias csleep Invoke-Standby
function Invoke-Hibernate
{
&"$env:SystemRoot\System32\rundll32.exe" powrprof.dll,SetSuspendState Hibernate
}