PS Script is exporting an empty CSVs
Unless you read the input file into memory in full, up front, you cannot safely read from and write back to the same file in a given pipeline. Specifically, a command such as Import-Csv file.csv | … | Export-Csv file.csv will erase the content of file.csv.[1] The simplest solution is to enclose the command that … Read more