手动设置静态IP

最终解决办法

1
2
3
4
5
6
7
8
9
# 以管理员身份运行 powershell
Get-NetAdapter #得到需要配置的网络接口名字。

# 然后运行一条命令
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\$((Get-NetAdapter -InterfaceAlias 刚才得到的网络接口名).InterfaceGuaid)" -Name EnableDHCP -Value 0

#再运行一条命令
Remove-NetRoute -InterfaceAlias 刚才得到的网络接口名 -AddressFamily IPv4 -Confirm:$false

输入完上面的命令后,对应的网络设配器属性中 IPV4就会变成静态空白状态,手动输入静态IP即可。


手动设置静态IP
http://anximin.github.io/2024/08/20/net_IPrepair/
作者
Sylar
发布于
2024年8月20日
许可协议