Windows批处理命令for的妙用

2024-10-14 21:38:38

1、先看一下网内还都有谁没有关机,在运行里输入cmd打开命令行,我们公司的IP地址从192.168.1.101到192.168.1.112,因此在命令下输入for %足毂忍珩i in (101,102,103,104,105,106,107,108,109,110,111,112) do ping 192.168.1.%i后回车

Windows批处理命令for的妙用

3、再针对没关闭电脑输入批处理强制关机命令for %i in (101,104,105) do shutdown –s –f –m \\192.168.1.%i回车

Windows批处理命令for的妙用
猜你喜欢