I need multiple DNS ips with xDnsServerAddress

Welcome Forums DSC (Desired State Configuration) I need multiple DNS ips with xDnsServerAddress

This topic contains 2 replies, has 2 voices, and was last updated by

 
Participant
2 years, 5 months ago.

  • Author
    Posts
  • #39456

    Participant
    Points: 0
    Rank: Member

    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?

  • #39457

    Member
    Points: 0
    Rank: Member

    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"
    } 
    
  • #39477

    Participant
    Points: 0
    Rank: Member

    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.

The topic ‘I need multiple DNS ips with xDnsServerAddress’ is closed to new replies.