This forum is closed. Thank you for your contributions.
Hi,
I have a IP.txt with 100 IP Addresses, how to write a script to obtain Computer Names for each IP in this IP.txt list and export to CSV?
Thank you
Tuan
Try
Get-Content C:\IP_Address.txt | ForEach-Object {([system.net.dns]::GetHostByAddress($_)).hostname >> c:\hostname.txt}
From https://gallery.technet.microsoft.com/scriptcenter/Get-Hostname-from-IP-ce61802f
Kindregards
Peter