Windows system ping package display time (absolutely easy to use)

Use the administrator to hit Windows 10 Windows PowerShell, use the following command to start ping
e.g. ping192.168.0.1:

ping.exe -t 192.168.0.1 |Foreach{"{0} - {1}" -f (Get-Date),$_}

running result:

If you want to ping and log to a text file:

ping.exe -t www.baidu.com |Foreach{"{0} - {1}" -f (Get-Date),$_}>D://192.168.0.101pinglog.txt

Leave a Comment

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