
Part III: Working with PowerShell in a Production Environment
368
This script can be divided into three pieces. The first is the command (dnscmd) . This is the executable
that will perform the work based upon the given parameters, shown in Figure 13 - 3 .
Figure 13-3
The second section, as shown next, is for the location of the DNS server ($DNS_Server) and the zone
($DNS_Zone) that the record will be added to:
Insert dns server /recordadd dns zone here
The last section includes the name ($Cluster_Name) and the IP address ($Cluster_IP) of the ‘ A ’
record that will be created. (See Figure 13 - 4 .) At this point, you may be wondering why the DNS record
and the user have been created from the command line and not through the GUI. At the end of this
chapter we bring all of these separate scripts together to show how using PowerShell to automate
common tasks saves time and reduces errors in the deployment of Single Copy Clusters.
Verify the ‘ A ’ record was created by using
nslookup , as shown in Figure 13 - 5 .
c13.indd 368c13.indd 368 12/17/07 3:58:01 PM12/17/07 3:58:01 PM