Answer: Once you’ve decided on which particular FQDN information you want to return – the post mentioned above has a few different options such as ip address or Hostname , then it’s just a matter of being able to read a list of servers, executing the code for every server.

This Powershell code will stream a list of servers from a text file , and then recover the FQDN from [System.Net.Dns]::GetHostByName cmdlet.