How to change dns setting using powershell -
I am really confused from where I will populate only two fields in the network adapter settings. Those two fields are preferred DNS and optional DNS, IPs will be dynamically allocated using DHCP. At present, I fill in two fields manually, but I want a power script to do this. I searched the internet but its really misleading. You can try with somebody:
Get-WMIObject -Class Win32_NetworkAdapterConfiguration -Filter "IPEnabled = true" $ Card.EnableStatic ('192.168.1.2', '255.255.255.0') $ carte.SetGateways ('192.168.1.1') $ carte.SetDNServerSearchOrder (@ ('192.168.1.10', '10.10.1.8 '))
Comments
Post a Comment