Commandlines for shutdown, reboot, logoff, standby and hibernate (from: A standby shortcut? – The PC Guide Discussion Forums)
Posted by jpluimers on 2009/06/11
Being a commandline person (I prefer to think of it as ‘classic’ more than like ‘dinosaur’), I have a ton of batch-files in my %SystemDrive%BIN directory.
Recently, I needed one for hibernating, which I found in this posting: A standby shortcut? – The PC Guide Discussion Forums.
Here is the list:
| Shutdown.bat / Halt.bat | %windir%System32shutdown.exe -s |
| Reboot.bat | %windir%System32shutdown.exe -r |
| Logoff.bat | %windir%System32shutdown.exe -l |
| Standby.bat | %windir%System32rundll32.exe powrprof.dll,SetSuspendState Standby |
| Hibernate.bat | %windir%System32rundll32.exe powrprof.dll,SetSuspendState Hibernate |
Maybe it has some use for you too :-)
–jeroen






Bert Haver said
Hi Jeroen,
I like batchfiles too! We are using batchfiles for scripting withing our (Kaseya) PC (Windows) maintenance system.
I’m looking for a command line sequence to remotely disable Windows powersettings. Have you ever needed/found this somewhere?
jpluimers said
Dear Bert,
I never did those particular things, but you might want to try this links to get started:
How to use Powercfg.exe to create a Group Policy object for power schemes in Windows XP
–jeroen
mhestl said
Nice…
Since your still using batch files…As a commandline person are your familiar with Powershell?
If not check it out (Channel9 has some cool demo’s on Powershell: http://channel9.msdn.com/tags/PowerShell/)
jpluimers said
For smaller things, I still tend to use plain batch files.
When it gets more complex, I use more advanced scripting tools highly depending on my environment (like OS ).
I’m not yet completely familiar with Powershell, but that’s because of its’ vast possibilities.
I do use it though.
–jeroen