我试图弄清楚如何创建一个批处理文件,该批处理文件加载到服务器上并且可以在特定时间关闭 52 个桌面。我了解这将为每台计算机运行:
shutdown –m \\computername01 –s –f –c “The computer will restart, please save all work.” –t 60
shutdown –m \\computername02 –s –f –c “The computer will restart, please save all work.” –t 60
ETC...
但问题是,我希望能够提供取消关机的选项,以防有人在计划任务时仍在使用计算机。
像这样的工作:
@echo off
echo Your PC will shutdown in 30 seconds! Press CTRL+C to abort.
ping -n 31 127.0.0.1>nul
shutdown –m \\computername01 –s –f –c “The computer will restart, please save all work.” –t 60
shutdown –m \\computername02 –s –f –c “The computer will restart, please save all work.” –t 60
还是必须是这样的:
@echo off
echo Your PC will shutdown in 30 seconds! Press CTRL+C to abort.
ping -n 31 127.0.0.1>nul
shutdown –m \\computername01 –s –f –c “The computer will restart, please save all work.” –t 60
@echo off
echo Your PC will shutdown in 30 seconds! Press CTRL+C to abort.
ping -n 31 127.0.0.1>nul
shutdown –m \\computername02 –s –f –c “The computer will restart, please save all work.” –t 60
任何帮助都会很棒!