So far this week I have shown you how to register and how to import virtual machines with configuration problems using PowerShell. However, the question I most often hear is this one: how do I use PowerShell to live migrate a virtual machine to another computer – where the virtual switch names do not match?
Once again – the answer is: “Use Compare-VM”
Here you can see that I try and use Move-VM to live migrate a virtual machine, and I get an error because the virtual switch names do not match. And just like in the other cases, I call Compare-VM and give it the same parameters as when I tried to use Move-VM.
After doing this I just need to fix the incompatibilities and pass the results into Move-VM.