Skip Ribbon Commands
Skip to main content

Ondrej Sevecek's English Pages

:

Comments: Re: How to import virtual machine into Hyper-V using WMI on Windows 2008 and Windows 2012

Engineering and troubleshooting by Directory Master!
MCM: Directory

Sorry comments are disable due to the constant load of spam

2

Title

Re: How to import virtual machine into Hyper-V using WMI on Windows 2008 and Windows 2012

Author

ondass

Body

also note that if you need to elaborate and test, you sometimes must delete pending Msvm_PlannedComputerSystem instances that you are not able to completelly import/finish.

To delete all Msvm_PlannedComputerSystem instances without trying to complete their import with the RealizePlannedSystem, you can use the following code snippet:

$vmms = Get-WmiObject MSVM_VirtualSystemManagementService -namespace "root\virtualization\v2"
(gwmi  Msvm_PlannedComputerSystem -names root\virtualization\v2) | % { $vmms.DestroySystem($_) }

Attachments

Created at 07/08/2013 17:25 by  
Last modified at 07/08/2013 17:25 by