PowerShell’s Compare-Object is great if you want to compare specific parts of objects programmatically, but it leaves a lot to be desired if you are looking at multiple properties of complex objects. For that, VS Code is amazing! But how can we tie the two together?
I made a function called Compare-ObjectsInVSCode to take any PowerShell object, and convert it to JSON for comparison using VS Code’s -d switch, which is launched automatically.

Hopefully others can get some use from it as well:
Happy Independence Day to my fellow Americans! πΊπΈπ¦