This is a great piece of work. I found this issue when it failed to run. The error was ambiguous due to it getting created from inside the runspace. I also realized the Export-CSV cmdlet was missed the -NoTypeInformation parameter which provides cleaner output. Lastly, while the CSV output is nice, I added the import of the log file to the end and output it in a table so you don't have to go hunt for the results.
This is a great piece of work. I found this issue when it failed to run. The error was ambiguous due to it getting created from inside the runspace. I also realized the Export-CSV cmdlet was missed the -NoTypeInformation parameter which provides cleaner output. Lastly, while the CSV output is nice, I added the import of the log file to the end and output it in a table so you don't have to go hunt for the results.
Happy to discuss these changes and hope it helps.
//Jason