New favorite PowerShell command

Everytime I have to open log file I always wished it would update on its own so I didn’t have to close it and open it again. I know applications like visual studio notify you when a file updates but its usually not a good idea to install it on the production machine and across the network access can be painful.

In comes PowerShell to save the day… And its install on pretty much all modern windows servers these days as standard.

Get-Content -Wait

Will print out the content of the log and wait at the bottom, when new lines are added the screen is too. How did it take me so long to find this!

For those of you familiar with linux this is similar to

tail -ls


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s