1. 关机命令
shutdown -s -t + 时间 (关机操作命令)
或: shutdown /s /t + 时间
如:shutdown /s -t 100
2.重启命令
shutdown -r -t + 时间 (重启操作命令)
或: shutdown /r /t + 时间
如:shutdown /r -t 100
3.取消操作
无论是关机操作还是重启操作都会弹出倒计时对话框,但是不能通过鼠标操作关掉,要想取消,只能输入命令
shutdown -a (取消一切倒计时)
4. 强制关机重启操作
只需在shutdown 后边加上 -f 即可
如:shutdown -s -f -t 100
则在100s倒计时结束后立马强制关机。
5. 添加关机或重启的原因注释
需在shutdown 后边加上 -c +"字符串" 即可
如:
shutdown -s -t -c "I LOVE YOU"
Note:此操作不要随意在真实机中操作,请在虚拟机中操作,另,不同的操作系统显示的界面不一样,但结果一样