Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

how to delete saved VM state the scripted way

$
0
0

Hi there,

I exported five Hyper-V VMs for importing them onto other servers. I was trying to import them with a script, but none of them successfully imported, cause they were in saved state - and the new servers are having other processor features. So I have to delete the saved state.

It's no problem to do so in the Hyper-V GUI, if you do an import, you are getting an incompatibility report with a command box to delete the saved state - then click OK and the VM is imported.

Unfortunately I couldn't find a way to do that in a powershell script. I found the cmdlet "remove-vmsavedstate", but that cmdlet want's a VM, that already exists in Hyper-V management.

I found the "compare-vm", which is showing me, that the VM I'm trying to import has incompatibilities.

But I found no way to resolve these incompatibilities ( delete saved state ) the scripted way with a VM that is only existing as export on disk.

Any ideas?

Yours Franz-Georg


fgc


Viewing all articles
Browse latest Browse all 15028


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>