Forum Navigation
You need to log in to create posts and topics.

Tail Logs using Powershell

Skip to end of metadata

Go to start of metadata

Problem

Tailing is to be able to read the logs as they are written. This method is mainly used in Linux terminals but PowerShell has a built in functionality that resembles it. In certain cases, user would like  to debug the issue with whichever process in a live manner rather than wait for the log to finish writing.

Example

Tailing processes such as installation can really help understand which phase of the installation was taking long and where the issue lies.

Solution

Basic Tail

Get-Content {filename} -Wait

With Options

Get-Content .\Application.log -Tail 2 -Wait | Select-String "ERROR"