A few days ago, I had to query over 100 DNS records to determine if both forward and reverse records were working properly. Making the nslookup over 100 records is a time–consuming and daunting task for a system administrator. Therefore, I decided to write a PowerShell script to automate this task..
For beginners new to powershell,
1) Copy the below code & put into file that has .ps1 extension, (i.e, Find_DNS_Forward_Reverse.ps1)
2) Put the host names in the hostnames.txt in the same directory as powershell script.
3) Run the script, it will ask for input parameters.
Code as below: