Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 252940

Re: How to use ConfigurationCloneToWorkspace in Powershell

$
0
0

I figured this out!!! So VMCopyData is the class that is used by the LibraryCloneToWorkspace method in the SOAP API.  However, if you try to create a new instance of a VMCopyData Object in powershell using the standard command:

 

$object = New-Object VMCopyData

 

...you get an error saying that VMCopyData is not defined.  That's because Powershell imports the classes in a weird way and puts a long prefix on the beginning.  Here is the full name of the VMCopyData class in Powershell:

 

Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy3r_SOAP_LabManagerInternal_asmx.VMCopyData

 

If you replace VMCopyData with the longform class name you will be able to create VMCopyData objects, assign properties to those objects, and put them into an array to be used by the LibraryCloneToWorkspace command.  This command then works perfectly!

 

This is especially important when doing batch clones from a single source machine, because the normal ConfigurationClone command only lets you clone from another workspace configuration, which adds 1 to the chain length for every clone you create.  Only cloning from the library avoids creating a long chain.


Viewing all articles
Browse latest Browse all 252940

Trending Articles



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