Tail a Log File using Windows PowerShell

Share this article :

In Windows, you can use the PowerShell to do the tail functionality. So, to execute this, following below commands,

• To view the bottom X number of lines from a log file.

Get-Content YOUR_LOG_FILE –Tail 30

• To get tail end of a log in real time.

Get-Content YOUR_LOG_FILE –Wait

• To filter the log using keyword.

Get-Content YOUR_LOG_FILE -wait | where { $_ -match “CRITICAL” }


Related posts

Restore Items from Windows Recycle Bin
How to Determine Windows Configured on Domain or Workgroup (standalone)
File Access Denied - require permission from S-1-1-0
Windows Hosts file: You don't have permission to save in this location
© 2017 ITsiti. All Rights Reserved
Powered by KEEM