Chapter 27. Manipulating DNS
DNS
is a core technology of Active Directory that cannot be overlooked.
While features such as Active Directory Integrated DNS can take a lot
of the hassle of managing DNS servers and zones out of
your hands, you still have to set up the initial zone configurations.
Unfortunately, lack of a good DNS API has always been a big gap for
managing a Microsoft DNS server environment. The only way to automate
maintenance and management of Microsoft DNS has been by executing
Dnscmd commands from within a batch, VBScript, or
Perl script. Over time, Microsoft has continued to improve
Dnscmd, and as of Windows 2000, it provides just
about every option you need to manage DNS server configuration,
zones, and resource records using a command line. In Windows Server
2003, it even allows you to manage Application Partitions! Microsoft
also provides the DNS MMC snap-in for those that want to manage DNS
via a GUI, although it is not very suitable for managing large
environments.
Microsoft’s answer to the DNS API issue is WMI. As
explained in Chapter 26, WMI is
Microsoft’s API of choice for managing and
monitoring systems and services. With the WMI DNS provider, you have
complete programmatic control over a Microsoft DNS environment, much
as you do with Dnscmd from a command line.
In this chapter, we will cover the WMI DNS provider at length, including the properties and methods available for the primary WMI DNS classes. Several sample scripts will be shown, which will give ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access