I have a PowerShell script that dumps a gazillion lines to a csv file while processing a very large XML.
During the while read of the xml reader I write each line to a csv file like so:
$newline | add-content -path $csv_file
This works for 99% but occasionally I see in the log "add-content: stream was not readable" for 1 or 2 items out of gazillions, I presume because it is busy writing the past line to it.
Any resolution?