标签:
$wmi = Get-WmiObject win32_networkadapterconfiguration -filter "ipenabled = ‘true‘"
$wmi.EnableStatic("10.0.0.15", "255.255.255.0")
$wmi.SetGateways("10.0.0.1", 1)
$wmi.SetDNSServerSearchOrder("10.0.0.100")
来源
==============
Use PowerShell to Configure Static IP and DNS Settings
标签:
原文地址:http://www.cnblogs.com/awpatp/p/4549119.html