操作
1.在powershell 中执行代码:
ipconfig /all
找到目标网卡 Description
2.在powershell 中执行代码(注意 Microsoft ISATAP Adapter 替换成实际网卡的 Description):
$wmi = Get-WmiObject Win32_NetworkAdapterConfiguration | Where-Object {$_.Description -eq "Microsoft ISATAP Adapter"}
$wmi.EnableStatic("192.168.3.156", "255.255.255.0")
$wmi.SetGateways("192.168.3.1", 1)
$wmi.SetDNSServerSearchOrder("222.246.129.80")