Skip to content

Instantly share code, notes, and snippets.

@adamantnz
Created May 12, 2017 13:34
Show Gist options
  • Save adamantnz/005b7558d0d850d9f77dcd0b8269b826 to your computer and use it in GitHub Desktop.
Save adamantnz/005b7558d0d850d9f77dcd0b8269b826 to your computer and use it in GitHub Desktop.
Tail the most recent log file in a directory
get-content -tail 10 -wait -path (Get-ChildItem -Path C:\logs\...\ | Sort-Object LastAccessTime -Descending | Select-Object -First 1).FullName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment