Change Primary DNS settings on Windows server RRS feed

  • Question

  • I am writing a script in PowerShell to Change the Primary DNS server settings for Windows servers. I want to change ONLY the Primary DNS, but the script changes the Primary but also makes the Secondary and Tertiary DNS settings NULL.

    I am using Wmi-object for retrieving the details.

    Please suggest a method by which I can change ONLY the Primary and it does not affect the Other DNS settings.

    Thursday, July 18, 2019 9:45 AM

All replies