I'm using the select-string in my powershell script
Select-String D:\logs\xyz.log -pattern "error"
works fine but it gives me back ALL lines of my logfile which include the keyword "error". As I'm sending an email later with the detected logs a readable structure would me nice, but the content of the select-string does not include any structure.
Best solution would be to add <br> after every detected line, because the mail is in html format and this would solve my problem.
I was looking for any parameters of the select-string method but I didn't find a proper solution.
Any ideas?