13.9. Modifying the DNS Server Configuration
Problem
You want to modify the DNS Server settings.
Solution
Using a graphical user interface
Open the DNS Management snap-in.
If an entry for the DNS server you want to connect to does not exist, right-click on DNS in the left pane and select Connect to DNS Server. Select This computer or The following computer, enter the server you want to connect to (if applicable), and click OK.
Click on the server, right-click on it, and select Properties.
There will be several tabs you can choose from to edit the server settings.
Click OK to commit the changes after you’ve completed your modifications.
Using a command-line interface
With the following command, replace
<Setting>
with the name of the
setting to modify and <Value>
with
the value to set:
> dnscmd <DNSServerName
> /config /<Setting
> <Value
>
Using VBScript
set objDNS = GetObject("winMgmts:root\MicrosoftDNS") set objDNSServer = objDNS.Get("MicrosoftDNS_Server.Name="".""") objDNSServer.<Setting
> = <Value
> ' e.g. objDNSServer.AllowUpdate = TRUE objDNSServer.Put_
Discussion
The Microsoft DNS server supports a variety of settings to configure
everything from scavenging and forwarders to logging. With the DNS
Management snap-in, the settings are spread over several tabs in the
Properties property page. You can get a list of these settings by
simply running dnscmd
/config
from a command line. For the CLI and VBScript solutions, the setting names are nearly identical. In the VBScript solution, be sure to call ...
Get Active Directory Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.