Kelly Garcia
asked on
wmi set dns server powershell
Hi Guys,
I have this code to define the dns server:
$wmi = Get-WmiObject win32_networkadapterconfig uration -filter "ipenabled = 'true'"
$wmi.EnableStatic("10.0.0. 15", "255.255.255.0")
$wmi.SetGateways("10.0.0.1 ", 1)
$wmi.SetDNSServerSearchOrd er("10.0.0 .100")
However I also need to specify the alternative dns server ideally using powershell,l how can I do this?
thank you in advance.
I have this code to define the dns server:
$wmi = Get-WmiObject win32_networkadapterconfig
$wmi.EnableStatic("10.0.0.
$wmi.SetGateways("10.0.0.1
$wmi.SetDNSServerSearchOrd
However I also need to specify the alternative dns server ideally using powershell,l how can I do this?
thank you in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
$wmi.SetDNSServerSearchOrd