Author Posts

May 21, 2016 at 5:32 pm

Is there a way to create a primary and secondary ip for an interface using xDnsServerAddress?

This works:

xDnsServerAddress DnsServerAddress
{
Address = "8.8.8.8"
InterfaceAlias = "Ethernet"
AddressFamily = "IPV4"
}

But this fails:

xDnsServerAddress DnsServerAddress
{
Address = "8.8.8.8,9.9.9.9"
InterfaceAlias = "Ethernet"
AddressFamily = "IPV4"
}

...maybe just a syntax issue?

May 21, 2016 at 5:45 pm

Address is an array, you need to pass in multiple strings rather than a single string that happens to contain a comma:

xDnsServerAddress DnsServerAddress
{
    Address = "8.8.8.8", "9.9.9.9"
    InterfaceAlias = "Ethernet"
    AddressFamily = "IPV4"
} 

May 22, 2016 at 4:36 pm

Ah ok thanks worked perfectly!

Last question – is there a way to specify this for all interfaces regardless of InterfaceAlias? InterfaceAlias = "*" does not seem to work.