How to shutdown a computer using a command
How to shutdown your Windows computer using a batch file.
You can use the shutdown command in a command prompt or a PowerShell console to make a computer log off, reboot or turn off.
STEP ONE:
To make a computer log off you type:
shutdown -l
STEP TWO:
To make a computer reboot you type:
shutdown -r
STEP THREE:
To make a computer shutdown you type:
shutdown -s
STEP FOUR:
To stop a computer from shutting down you type:
shutdown -a
STEP FIVE:
You may of noticed that the default time for these commands is 30 seconds, but you can change it.
To change the time from 30 seconds you type:
shutdown “what you want the computer to do” -t “amount of time in seconds”.
Where it says “what you want the computer to do” replace that with either -s, -l or -r.
e.g. shutdown -s -t “10”
STEP SIX:
To force a computer to shut down (Cannot be cancelled) you type:
shutdown -s -f
The “-f” forces all running applications to close.
Leave a Reply