Created
May 12, 2017 13:34
-
-
Save adamantnz/005b7558d0d850d9f77dcd0b8269b826 to your computer and use it in GitHub Desktop.
Tail the most recent log file in a directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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