Skip to main content

Hello everyone,

I am looking for a script to add Vmware VMs to subclient.  I have been poking around Powershell SDK/Commands but i am not successful so far with the latest Powershell v32 SDK

 

Eventually i need to feed VM Names from csv file and loop through but for now just testing with a single VM. 

Add-CVVirtualMachine -ClientName myVCenter -SubclientName z_Subclient_0400PM -EntityType VM -Entity my-vmname

 

Getting following error: 

“Get-CVVirtualMachine : A parameter cannot be found that matches parameter name 'Name'.
At C:\Program Files\WindowsPowerShell\Modules\CommvaultPowerShell\0.2.11\custom\oldsdk\Add-CVVirtualMachine.ps1:166 char:61
+ ...                         $vmProps = Get-CVVirtualMachine -Name $entity ...
+                                                             ~~~~~
    + CategoryInfo          : InvalidArgument: (:) Get-CVVirtualMachine], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Get-CVVirtualMachine 

 

Thanks,

 

Thank you for reporting this error.

We will fix this soon.

This cmdlet is available in the old SDK : https://github.com/Commvault/CVPowershellSDK as well.

You can uninstall the existing version and install through this github which will work for your requirement for now.  


thank you! problem is that, the old sdk works for a single VM but fails to add multiple VM in the list well. 

 

Add-CVVirtualMachine -ClientName myVCenter -SubclientName z_Subclient_0400PM -EntityType VM -Entity my-vmname, my_vmname2, my_vmname3

 

Any ETA when will get it fixed? 

 

Thank you!


@JnaneshD do you know if this is fixed in 0.2.13 ? 


Hi @Just Learning , 

It is not been fixed yet. We will work on this and update.

Thanks


Reply