Forum Discussion
jos07
Feb 01, 2022Copper Contributor
How to compare two xml files and display the difference side by side.
$baseServer="C:\Store\PS\referrencexml.xml" $Server2Compare="C:\Store\PS\differencexml.xml" $boutput = Compare-Object -ReferenceObject (Get-Content -Path "$baseServer") -DifferenceObject (Get-Conte...
Feb 01, 2022
Not sure if that's possible, but it's PowerShell so anything is ;), but you could try this to show the differences in the second file
$original = Compare-Object $XML1 $XML2 | Where-Object{ $_.SideIndicator -eq "=>" } | ForEach-Object{ $_.InputObject }
- jos07Feb 02, 2022Copper ContributorHarm_Veenstra
Thank you for your reply. Yeah I could get the difference of other file in the new variable/file, but again combining it and display it side by side is something I'm not able to do.