How can I view a log file from powershell console ? (i.e. powershell equivalent of 'less')

It reads like you know you can do this:

gc logfile.log | more

(GC is an alias for Get-Content).

You may be able to do the filtering etc.. with this more information can be found by running these commands:

Get-Help Get-Content Get-Help

Get-Content -Examples

(Get-Help gc would work fine as well).

And the bits you may be interested in are limit\filter etc...

Get-Help gc -Parameter * | more


I just use the GOW version of less, works fine.


I don't know of any direct analogue for less in powershell that you can implement easily. Your best bet is to get a windows implementation of less that is outside of cygwin, that way you can just drop in the binary somewhere accessible to your account.