title: Getting hostnames for ip-adresses using nslookup in Powershell
body: <p>I'm actually zero to Powershell scripting, but I need to write one, to go through a .txt file with ip-adresses wrote in one per line and run nslookup for each adress to get it's hostname and write it in file (or get an error message if there is no DNS record for used IP).</p>
  
  <p>I found this topic this almost the same task: <a href="https://stackoverflow.com/questions/18102227/getting-ip-addresses-for-hostnames-using-nslookup-in-powershell">Getting IP addresses for hostnames using nslookup in Powershell</a></p>
  
  <p>so I need a similar solution, but using IP-adresses as input to get hostnames (or error message) in output.</p>
  
  <p>Does anyone able to help me?</p>
  
  <p>Thank you.</p>