=以下为我自己所用的========
title 1.bat
netsh interface ip set dns “本地连接” static 10.223.253.1 primary
netsh interface ip add dns “本地连接” 218.2.135.1
taskkill /FI “WINDOWTITLE eq 1.bat” /IM cmd.exe /F
=以上为我自己所用的命令===========
将以上代码保存为“修改dns批处理.bat”文件,发送到学生电脑。
然后在极域里,远程命令里选择文件夹路径为“C:\WINDOWS\system32\cmd.exe”,参数为“/k c:\修改dns批处理.bat”,如图所示:
以下为百度所查答案:
echo off
cls
title 设置IP
echo 正在设置IP地址,请稍候……
netsh interface ip set address “本地连接” static 192.168.218.169 255.255.255.0 192.168.218.254 1
echo 正在更改DNS设置,请稍候……
echo 正在更改DNS设置,请稍候……
netsh interface ip set dns “本地连接” static 192.168.12.128 primary
netsh interface ip add dns “本地连接” 192.168.12.129
echo 恭喜你,修改完成!
修改首选DNS、备用DNS的方法:
netsh interface ip set dns “本地连接” static 192.168.12.128 primary
netsh interface ip add dns “本地连接” 192.168.12.129