DisableNSRecordsAutoCreation with Dnscmd

Photo of author
Written By Jan Reilink

Windows Server system administrator & enthusiast.

This post explains how to restrict automatic NS resource record registration in Windows Server DNS using Dnscmd. This prevents Windows Server DNS to automatically create NS records for zones that it hosts on the server.

This registry key restricts the DNS server to create name server resource records (NS records) automatically while loading it’s DNS zones. By default the name server automates the creation of name server resource records upon loading its zones.

If the registry value is set to 1, the DNS server is restricted from registering NS resource records for authoritative zones. Also existing Name server (NS) records for the authoritative zones that are located on the DNS server are deleted automatically.

Enable DisableNSRecordsAutoCreation with Dnscmd

To enable DisableNSRecordsAutoCreation on the command line use the following command:

Dnscmd /config /DisableNSRecordsAutoCreation 1
Code language: PowerShell (powershell)

Protip: enabling this DisableNSRecordsAutoCreation setting disables the auto creation of NS records zones that it hosts.

When you just want to know the current status of the setting, run:

Dnscmd /info /DisableNSRecordsAutoCreation
Code language: PowerShell (powershell)

And you can always disable it: Dnscmd /config /DisableNSRecordsAutoCreation 0

Did you like: DisableNSRecordsAutoCreation with Dnscmd

Then please, take a second to support Sysadmins of the North and donate!

Your generosity helps pay for the ongoing costs associated with running this website like coffee, hosting services, library mirrors, domain renewals, time for article research, and coffee, just to name a few.

Hi! Join the discussion, leave a reply!