Ping with timestamp and logging

Open Powershell

Start-Transcript to record your Powershell Session

Start-Transcript -path C:\Temp\Ping-logging.txt -Append

Now timestamp the ping command

Ping.exe -t | ForEach {"{0} - {1}" -f (Get-Date),$_}

More information about the command and the -F format operator can be found here.

PowerShell: Using the -F format Operator

Create a Transcript of What You Do in Windows PowerShell

The -f Format operator

Leave a Reply

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