Skip to main content

Posts

Showing posts from April, 2015

Compare 2 CSV files and store result in 3rd CSV file using PowerShell

Below script is to compare 2 CSV files and store result in 3rd CSV file using PowerShell, $file1 = Import-CSV -Path "C:\A.CSV"  $file2 = Import-CSV -Path "C:\B.CSV" $result = Compare-Object -ReferenceObject $file2 -DifferenceObject $file1 -Property List_URL -PassThru If ($result) {     $result | Export-CSV C:\C.csv -NoTypeInformation }