Sometimes you might be unable to use shutdown/restart command from the start menu when remotely logged into a machine.
Here is a few but handy windows command to remotely shutdown a machine. Most server administrators in Zambia are not so exposed to the use of command. There’s so much dependence on the GUI.
With Powershell or the legendary CMD some task can so easily be carried out. Here are a few commands you can use to remotely shutdown a machine
Here’s how to do the shutdown functions via a powershell or cmd:
shutdown -r— restarts
shutdown -s— shutdown
shutdown -l— logoff
shutdown -t xx— where
xxis number of seconds to wait till shutdown/restart/logoff
shutdown -i— gives you a dialog box to fill in what function you want to use
shutdown -a— aborts the previous shutdown command….very handy!
shutdown -h— hibernate. Easy mistake – it’s not for help
-f— force the selected action
/f parameter is very handy. If you are on a remote machine, you may also want to add the -f option to force the reboot. Otherwise your session may close and a stubborn app can hang the system.
Also remember to give a bit of time space option on the remote rather than it immediately shut down. The best option i like is
shutdown -t 30 -r
Note that the /f parameter is implied when a value greater than 0 is specified for the /t parameter
Also fruitful is the command that can be done to shutdown a machine without remote desktop
shutdown -t 30 -r -m \\xxx
where xxx is the desired machine name or IP address in the domain