使用批处理命令设置windows系统的ip地址和dns附图

脚本专栏 发布日期:2024/10/19 浏览次数:1

正在浏览:使用批处理命令设置windows系统的ip地址和dns附图
找到对应的网卡名称

使用命令:ipconfig
复制代码 代码如下:
ipconfig/all

Windows IP Configuration

Host Name . . . . . . . . . . . . : D501-4-3
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter 本地连接:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Marvell Yukon 88E8057 PCI-E Gigabit
Ethernet Controller
Physical Address. . . . . . . . . : 44-37-E6-1D-5B-F1
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.1.111
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : 8.8.8.8

我们现在需要设置的网卡名称为"本地连接",ip地址为192.168.1.111,子网掩码为255.255.255.0,dns地址为8.8.8.8

将ip和dns设置为自动获取

使用命令:
netsh interface ip set address "本地连接" dhcp
netsh interface ip set dns "本地连接" dhcp

复制代码 代码如下:
netsh interface ip set address "本地连接" dhcp
确定。

netsh interface ip set dns "本地连接" dhcp
确定。

相当于操作:
使用批处理命令设置windows系统的ip地址和dns附图 

将ip和dns设置为固定的值

使用命令:
netsh interface ip set address "本地连接" static [ip地址] [子网掩码] [网关] [网关跳远点数:一般填1]
netsh interface ip set dns "本地连接" static [dns地址]
复制代码 代码如下:
netsh interface ip set address "本地连接" static 192.168.1.111 255.255.255.0 192
.168.1.1 1
确定。

netsh interface ip set dns "本地连接" static 8.8.8.8
确定。

相当于操作:
使用批处理命令设置windows系统的ip地址和dns附图
微软与英特尔等合作伙伴联合定义“AI PC”:键盘需配有Copilot物理按键
几个月来,英特尔、微软、AMD和其它厂商都在共同推动“AI PC”的想法,朝着更多的AI功能迈进。在近日,英特尔在台北举行的开发者活动中,也宣布了关于AI PC加速计划、新的PC开发者计划和独立硬件供应商计划。
在此次发布会上,英特尔还发布了全新的全新的酷睿Ultra Meteor Lake NUC开发套件,以及联合微软等合作伙伴联合定义“AI PC”的定义标准。