I have question how would I go about outputing to log file errors in a csv format. For example errorid, message, application etc.
I know to write to log file in general you would use thing something like:
Start-Transcript -path $LogFile -force
write-host "Error has occured"
How would one utilize the output of the write-host command so it output a message like:
0012 - Tab - Error has occured - Tab - Explorer.exe
The column name being on top of the csv file.
Any help would be much appreciated.