I'm attempting a config-only VM export using this script, which was originally posted nearly ten years ago.
Hyper-V internals have clearly changed since then, as I'm getting an error message:
Failed to save with Error 'The device does not recognize the command.'
I'm not finding any indication as to what this command might be, for purposes of troubleshooting, but at first glance an apparent candidate is the ExportSystemDefinition()
call:
$Out = $Service.ExportSystemDefinition($VM.Path.Path, $Target, $Export.GetText(1))
However, PowerShell IntelliSense completes for this method call. So it must be valid. It might be a Gen1/Gen2 thing, since Gen2 likely didn't exist back then (my VM is Gen2).
When I run the script $task.JobState
equals 10
, but I'm not sure what this error code is or how to look it up.
How can I get this to work?
0 Answers