http://ss64 *org/viewtopic.php?pid=8188
http://stackoverflow *com/questions/28304099/batch-script-to-ping-other-pc-in-my-lan-and-shutdown-together-last-online-pc
http://www msfn org/board/topic/173438-shutdown-last-running-pc-on-the-lan-with-server/
http://forum_synology *com/enu/viewtopic.php?f=145&t=96609
http://www_dostips *com/forum/viewtopic.php?f=3&t=6245
我认为最后一个会更容易使用谢谢你的回答!
@echo off
set "flag="
ping 192.168.1.1 -n 2 |find /i "TTL=" >nul && set flag=1
ping 192.168.1.2 -n 2 |find /i "TTL=" >nul && set flag=1
ping 192.168.1.3 -n 2 |find /i "TTL=" >nul && set flag=1
ping 192.168.1.4 -n 2 |find /i "TTL=" >nul && set flag=1
if not defined flag echo shutdown server