Want something equivalent to the Linux Tail command but for Windows? Use PowerShell!

If you’re like me and you write a lot of scripts that take anywhere from 15 minutes to 50 minutes to complete an install, sometimes it’s nice to be able to see the log file generated as the installation completes.

In Linux, I would simply use:

(without quotations) to monitor the file as new lines are added. In Windows, typing tail into command prompt or Windows PowerShell won’t do anything aside from generate an error. However, you can easily use:

(again, no quotations) to accomplish the same task. The -wait switch allows it to “monitor just as tail -f in Linux would.

Let me know if this worked for a project you were working on in the comments section below!

Reminder: All of my posts are provided "AS IS", imply no warranties, and confer no rights or special privileges. Use of included postings, code samples and other works are subject to the terms specified at Microsoft. For more information, click here.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.