Getting IP addresses for hostnames using nslookup in Powershell
I am new to Powershell scripting and I need to write one script. I have a list of server hostnames and I need to get IP addresses of those servers and write the results in a file. The hostnames are one column in Excel spreadsheet but I can format them into anything (csv, simple txt file with one hostname per line etc.). I would like to format the output the way there is a hostname of the server and its IP address per line (so there are multiple lines in case the server has more than one IP). So far I have been using the simple text file with hostname per line, but from the output in PS I am