PowerCLI

 View Only
  • 1.  Set alternate DNS via powerCLI

    Posted Dec 12, 2013 11:42 AM

    Hi Guys

    Is it possible if we canstraight away set alternate DNS address of a esx host without touching its primary address. Like what I want there should not be any task in VC for primary DNS address and it should only be changing the secondary addresss.

    I understand we can set the primary DNS address to same what it is right now but just want to straight away hop to secondary address.

    Please advice.

    Thanks

    Heera



  • 2.  RE: Set alternate DNS via powerCLI

    Posted Dec 12, 2013 06:11 PM

    Hi Heera,

    using the Set-VMHostNetwork cmdlet you have to specify the IP addresses of the primary and secondary DNS servers. There is no way to specify only the secondary DNS server. E.g.:

    Get-VMHost | Get-VMHostNetwork | Set-VMHostnetwork -DnsAddress "192.168.0.1","192.168.0.2" -DnsFromDhcp $false



  • 3.  RE: Set alternate DNS via powerCLI

    Posted Dec 12, 2013 11:51 PM

    Thanks for your reply.