• New Script: Set DNS Info V1.00

    August 11, 2020

    DNS, PowerShell

    Reconfigures the DNS Server(s) on a network interface on specified computers in Microsoft Active Directory. The computer accounts processed are filtered by IPEnabled and DHCP Disabled. Only computers using a Static IP Address are processed.

    Creates a text file named DNSChangeStatus.txt, by default, in the folder where the script is run.

    Optionally, can specify the output folder.

    The user running the script must be a member of Domain Admins.

    The script has a lot of error checking in it. It validates the DNS Servers entered whether they are NetBIOS names, Fully Qualified Domain Names (FQDN), or IP address.  Once the name or IP address is verified as valid, another check is done to make sure the server is running Microsoft DNS. If the DNS server is entered as a NetBIOS name or FQDN, the IP address is found since you can’t add a server’s NetBIOS name or FQDN as a DNS server entry on a computers network card properties.

    Figure 1 shows an example of a bad DNS server name entry.

    Figure 1
    Figure 1

    Figure 2 shows a valid server name, but the server does not run Microsoft DNS.

    Figure 2
    Figure 2

    Figure 3 shows a bad IP address.

    Figure 3
    Figure 3

    Figure 4 shows using FQDNs.

    Figure 4
    Figure 4

    Figure 5 shows using IP addresses. The IP addresses are used as entered. No sorting is done.

    Figure 5
    Figure 5

    Figure 6 shows the DNSChangeStatus.txt file generated.

    Figure 6
    Figure 6

    You can always find the most current script by going to https://carlwebster.com/where-to-get-copies-of-the-documentation-scripts/.

    Thanks

    Webster







    About Carl Webster

    Carl Webster is an independent consultant specializing in Citrix, Active Directory, and technical documentation. Carl (aka “Webster”) serves the broader Citrix community by writing articles (see CarlWebster.com) and by being the most active person in the Citrix Zone on Experts Exchange. Webster has a long history in the IT industry beginning with mainframes in 1977, PCs and application development in 1986, and network engineering in 2001. He has worked with Citrix products since 1990 with the premiere of their first product – the MULTIUSER OS/2.

    View all posts by Carl Webster

    No comments yet.

    Leave a Reply