Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Parse and return multiple strings from log files and export to .CSV file

$
0
0

Hi All, I'm trying to parse the following log file and output to a .CSV file.  The log file is created by a utility called ROIScan which is created by MS for Office reporting.

I need to search for "microsoft Visio" and exclude "Microsoft Visio viewer".  I was thinking something like this.

Get-ChildItem *.log | Select-String -Pattern "Microsoft Visio" | Select-String -Pattern -ne "Microsoft Visio Viewer".  Am i on the right track w/ this one?

If Visio is found, i need it then Parse the line from the log file, <License IsActive="TRUE", and list some of the data from this line as separate headers in a .CSV, such as "True", "Name", "Status Description".  I'm completely lost on this part.

Log File

Any examples or pointers would be helpful.  Thanks in advance.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>