Hi All,
I am having trouble performing some tasks in PowerCLI that I can do easily in the GUI.
Firstly, in the vCloud Director GUI, I can create a new vApp from a template that has one machine in it. I can also do that task from PowerCLI with something like the following code:
Connect-CIServer -server x.x.x.x -user ***** -org org-development -Password *****
$myVappName = 'TestApp03'
$myTemplate = Get-CIVAppTemplate -Name 'vWin2012-Template'
$myOrgVdc = Get-OrgVdc -Name 'vOrgDevelopment'
New-CIVApp -Name $myVappName -Description "Testonly." -OrgVdc $myOrgVdc -VAppTemplate $myTemplate
If I want to add some more VM's to this newly create vApp 'TestApp03', I can do it easily in the vCloud Director web GUI by browsing to the Virtual machines for the vApp, then on the actions click "add VM". I can then add several more copies of the VM from the template.
My problem is how do I perform this same action in PowerCLI ? How to add more machines from an existing template into an existing vApp ?
I want to only use "CI" type cmdlets and avoid having to "Connect-VIServer".
The version of PowerCLI that I have installed is "VMware-PowerCLI-5.5.0-1295336.exe"
Any insights or assistance is greatly appreciated.