Is there a way to do add a second column to the CSV in the following code snip? I'm putting this in a loop that goes through multiple files. I need another column so I know what file I need to look at when I get a get diff, and I can make it into a table in Excel for easy viewing.
I need the output to be one file, and am going to add Dmitri's funtion from http://dmitrysotnikov.wordpress.com/2010/01/19/export-csv-append/
I'm comparing one master set of source files against files from different servers, which is why I need to path as a column.
compare-object -referenceobject $(get-content $sourceFile) -differenceobject $(get-content $serverFile) | export-csv -Path d:\some.csv -notype -append