Skip to content

Instantly share code, notes, and snippets.

@sean-m
Created April 29, 2020 17:33
Show Gist options
  • Save sean-m/4bed044962509c9fcb3a66edbc58148d to your computer and use it in GitHub Desktop.
Save sean-m/4bed044962509c9fcb3a66edbc58148d to your computer and use it in GitHub Desktop.
One-liner for continuous ping with logging. Use it all the time and need a place to put it.
ping /t 192.168.1.1 | select -Skip 2 | % { "$(Get-Date -Format 'o'),$_" } | Tee-Object -FilePath "$env:temp\ping-$(Get-Date -UFormat %s).csv"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment