I would like to extract certain rows from a log file using native Windows command line tools or batch file (.bat). Here's a sample log file:
2009-12-07 14:32:38,669 INFO Sample log
2009-12-07 14:32:43,029 INFO Sample log
2009-12-07 14:32:45,841 DEBUG Sample log
2009-12-07 14:32:45,841 DEBUG Sample log
2009-12-07 14:32:52,029 WARN Sample log
2009-12-07 14:32:52,466 INFO Sample log
How to extract and print lines which have tag "WARN"? How to do this with PowerShell?