To shutdown remote machine
shutdown -s -f -m \\remotecomputername
To restart remote machine
shutdown -r -f -m \\remotecomputername
If you make this mistake you have 30 seconds to cancel the Windows shutdown with the -a switch.
-a Is for abort. This it only works during the time-out period
shutdown -a