Set MS DNS reverse zone options with PS

Dale Peterson 61 Reputation points
2023-03-15T18:45:45.2166667+00:00

Hello.

I have an on-prem MS DNS server with a bunch of reverse zones that need to be modified. I need to add a couple IP's to each of the individual zones, and modify the Zone Transfers options to set the "Only to server listed on the Name Servers tab" option.

So far I'm not having a lot of luck finding a CMDLET that will do either of those things. I'll script it out from there, but I can't seem to find the CMDLETs that will do that type of task. Does anyone have any ideas?

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,407 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 45,111 Reputation points
    2023-03-16T01:22:33.6633333+00:00

    To add the PTR record(s), use the Add-DnsServerResourceRecordPtr cmdlet.

    If you're trying to limit the primary zone to allow transfers only to a list of secondary servers, the Set-DnsServerPrimaryZone cmdlet is what you want.