背景:写一个bat文件,双击后就可以关闭所有的服务器包括linux服务器和windows服务器因为公司有这需求,在下班后要关闭所有的服务器这是shutdown.bat的范例试验证明,windows可以关闭#批量关闭windows机器net
use\\192.168.1.124\ipc$ "123456" /user:"administrator"shutdown -s -f -t
20
-m\\192.168.1.124#批量关闭linux机器....待补充....这是linux下的批量关linux服务器的脚本suse-linux:/opt/script/shell#
lltotal 8-rw-r--r-- 1 rootroot 84 May 22 10:33 ip.txt-rwxr-xr-x 1 root
root 179May 22 10:34 shutdown_boot.shsuse-linux:/opt/script/shell# cat
shutdown_boot.sh#!/bin/shfor ip in `cat ip.txt`do ssh $ip
<