I needed to merge multiple csv files containing exports from multiple VMware vCenter Servers environments so I decided to test Powershell to do this. I quickly found a solutions on the web but none of them worked exactly as I expected.
The first link found explains how to merge file by joining lines using a matching join condition. This will be really usefull for some future work but I don't needed this matching capability. I only want to append the content of all files into a single file without duplicating the header line.
Here we go!
So I came up with this script.
But the problem was that all the lines in the generated file were surrounded by quotes. So after reading 2 and 3, I came up with this script working perfectly!