Simple powershell ping log with timestamp

Here's a quick and dirty script that will ping with a timestamp, and save the ouput to a text file. I have used pingInfoView quite a bit, but sometimes this fits the situation better.


$hostAddress = Read-Host -Prompt 'IP Address or Hostname'
$fileName = Read-Host -Prompt 'Output file'


ping.exe -t $hostAddress|Foreach{"{0} - {1}" -f (Get-Date),$_}| Tee-Object -file $fileName

Comments

Popular posts from this blog

DNS entries needed for MLB app

OBi 200/202 no audio but call connects