How to export ping results with time stamp

Not daily, but sometimes we need to ping destination computer IP or Computer name with time stamp and export ping results with time stamp to text or csv so that we can monitor it later on or troubleshoot if there is any issue.

So we can do in CMD or PowerShell. We have provided here solution in PowerShell and you can customize it as per your requirement.

Step 1-

Open Windows PowerShell as Administrator and type below command to record your PowerShell in text file

ping.exe -t|Foreach{"{0} - {1}" -f (Get-Date),$_} >> c:\Ping_result.txt

Change “” as per your destination computer or website and “C:/Ping_result.txt” as per your local computer location

See below for your reference;

Step 2-

This will start saving your ping result to text file “C:/Ping_result.txt”

Cheers! Check you txt file for ping result with time stamp.

Leave a Reply

Your email address will not be published. Required fields are marked *