I am trying to extract some lines from a huge text file using a powershell script. Wondering if anyone can help me in doing that.
I have a huge file with all the system events and trying to extract all those lines/events which have the ip "172.16.2.62" in them.
This is what I have till now:
$log = get-content D:\scripts\iis.log
Try Select-String -Path D:\scripts\iis.log -Pattern '172.16.2.62' -SimpleMatch
Above cmdlet will return objects to the pipeline matching the lines and other details (line number, etc.)
Thank you very much. I tried it but I got this error:
The string starting:
You must be logged in to reply to this topic.