Quantcast
Channel: VMware Communities : Popular Discussions - vCloud Director PowerCLI
Viewing all articles
Browse latest Browse all 13334

Trouble adding more "CIVM" to a "CIVApp" in vCloud via PowerCLI 5.5

$
0
0

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.


Viewing all articles
Browse latest Browse all 13334

Trending Articles



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