If you’ve ever developed software on a Linux system, you’ve no doubt used the
tail command to print out lines as they are added to the end of a log file. The
tail command is used something like this:
You can accomplish the same task using Windows PowerShell. At the shell prompt, use the
Get-Content cmdlet. (Cmdlets are what commands are called in the PowerShell environment). The syntax is fairly simple.
Get-Content is …
mylogfile.log is the name of the log file.
-wait is …
You can also use
type as aliases for
You can also filter the log right at the command line using regular expressions:
“Using the Get-Content Cmdlet”. Microsoft Technet.