Since moving to Windows 8 on my primary laptop I have found myself using PowerShell to perform shutdown and restart tasks. For me hitting the charms and going through the options to do a simple shutdown was just way too much work, especially when I could just hit the PowerShell icon and type stop-computer or restart-computer.
One annoyance I found was that there was no pause-computer or equivalent to put the machine into standby, something very useful for a laptop.
Given that this was something I wanted to do I put something a new function in my profile to give me that ability. Now I can just type pause-computer and it will go into standby. Script below…
Write-Output "Going to standby..."
Start-Sleep -Seconds 1
&"$env:SystemRootSystem32rundll32.exe" powrprof.dll,SetSuspendState Standby