I am attempting to clone a bunch of VM's by exporting and then importing a Golden VM. I am using the Windows Server 8 DataCenter. I used the importVirtualSystemEx(...) to import an already exported VM.
I cannot seem to be able to display the Msvm_VirtualSystemImportSettingData object that I obtained using the GetVirtualSystemImportSettingData(...). I am pasting the code sample below
$ExpPath = "C:\Sample_Export"
$VMMgmtService = Get-WmiObject -Namespace "root\virtualization" -Class MSVM_VirtualSystemManagementService
$ImportSettings = $VMMgmtService.GetVirtualSystemImportSettingData($ExpPath)
$ImportSettings.GenerateNewId = $TRUE
$ImportSettings.CreateCopy = $TRUE
At this point im getting an error which says that
"Property 'GenerateNewId' cannot be found on this object; make sure it exists and is settable."
"Property 'CreateCopy' cannot be found on this object; make sure it exists and is settable."
Can you please shed some light on where I am going wrong?
Thanks in Advance!