New Script: Set DNS Info V1.00
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 2 shows a valid server name, but the server does not run Microsoft DNS.
Figure 3 shows a bad IP address.
Figure 4 shows using FQDNs.
Figure 5 shows using IP addresses. The IP addresses are used as entered. No sorting is done.
Figure 6 shows the DNSChangeStatus.txt file generated.
You can always find the most current script by going to https://carlwebster.com/where-to-get-copies-of-the-documentation-scripts/.
August 11, 2020