Hi I am very new to PowerShell and I wanted to create a script that would ping a list of hosts from a file and output the results into a file with the outcome. I’ve found this simple script online and it works but I need to have an outcome variant of ‘pingable’ which is when the CMD results in ‘request timed out’. Any help would be great. Thanks in advance.
There are script that already exist for this use case on the MS PowerShellGallery and all over the web.
Just do a search for ‘powershell ping up down’
Examples;
PowerShell – IP to HostName along with Ping in Excel
The script I am sharing today is extension of below script:PowerShell – Ping Machines and report in ExcelThis script will use list of IP address , pings them report if its up or down and query the Hostname from DNS...
https://gallery.technet.microsoft.com/scriptcenter/PowerShell-IP-to-HostName-a856289b