Linked Questions

Popular Questions

compare with Powershell 2 csv file and get result on output file

Asked by At

I want to compare two csv files, an initial file is available locally and the second file is exported from Rvstools with powershell, both files are in csv format, knowing that I have several two files to compare

initialfile1(vcenter1) compare it with rvtoolsexportfile1(Vcenter1) initialfile2(vcenter2) compare it with rvtoolsexportfile2(Vcenter2)

structure of file is :

initialfile1 : vm,initecoenv,initDS,appli,vcenter,cluster

exportfile1 : vm,currentecoenv,CurrentDS,appli,vcenter,cluster

The vm column of initialfile1 contains just a list of specific VMs to check the vm column of exportfile1 contains all vcenter VMs I need to check only the VMs in the file initialfile1

parameters to compare :

initialfile1 : vm,initecoenv,initDS

exportfile1 : vm,currentecoenv,CurrentDS

Result csv file if there is a difference: vm,initecoenv,currentecoenv,initDS,CurrentDS,Vcenter

if no difference write : No Svmotion migration detected

Thank you for your help

Related Questions