Below is what I am working with now. Is there a reference document somewhere that shows all the "$xyz" functions and switches?
Connect-CIServer -Server URL.com -User username -Password password -Org Demo-Area
$numVapp=2
$vappTemplate = Get-CIVappTemplate -Name "Centos_63_x64"
$myVAppNetwork = Get-CIVAppNetwork -Name "Demo-Area-Direct"
$vAppBaseName="scriptDB-"
for ($i=1; $i -le $numVapp; $i++){
New-CIVApp -Name ($vAppBaseName + $i) -VAppTemplate $vappTemplate
New-CIVAppNetwork -ParentOrgNetwork (Get-OrgNetwork) -VApp ($vAppBaseName + $i) -Direct
Get-CIVApp -Name ($vAppBaseName + $i) | Get-CIVM | Get-CINetworkAdapter | Set-CINetworkAdapter -IPAddressAllocationMode Pool -VAppNetwork -Connected $true
}
Errors Returned:
New-CIVApp : Cannot convert 'System.Object[]' to the type 'VMware.VimAutomation.Cloud.Types.V1.CIVAppTemplate' required by parameter 'VAppTemplate'.
Specified method is not supported.
At line:2 char:56
+ New-CIVApp -Name ($vAppBaseName + $i) -VAppTemplate <<<< $vappTemplate
+ CategoryInfo : InvalidArgument: (:) [New-CIVApp], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgument,VMware.VimAutomation.Cloud.Commands.Cmdlets.NewCIVApp
New-CIVAppNetwork : Cannot convert 'System.Object[]' to the type 'VMware.VimAutomation.Cloud.Types.V1.OrgNetwork' required by parameter 'ParentOrgNet
work'. Specified method is not supported.
At line:3 char:40
+ New-CIVAppNetwork -ParentOrgNetwork <<<< (Get-OrgNetwork) -VApp ($vAppBaseName + $i) -Direct
+ CategoryInfo : InvalidArgument: (:) [New-CIVAppNetwork], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgument,VMware.VimAutomation.Cloud.Commands.Cmdlets.VApp.NewCiVAppNetwork
Set-CINetworkAdapter : Missing an argument for parameter 'VAppNetwork'. Specify a parameter of type 'VMware.VimAutomation.Cloud.Types.V1.CIVAppNetwor
k' and try again.
At line:4 char:142
+ Get-CIVApp -Name ($vAppBaseName + $i) | Get-CIVM | Get-CINetworkAdapter | Set-CINetworkAdapter -IPAddressAllocationMode Pool -VAppNetwork <<<<
-Connected $true
+ CategoryInfo : InvalidArgument: (:) [Set-CINetworkAdapter], ParameterBindingException
+ FullyQualifiedErrorId : MissingArgument,VMware.VimAutomation.Cloud.Commands.Cmdlets.SetCINetworkAdapter
New-CIVApp : Cannot convert 'System.Object[]' to the type 'VMware.VimAutomation.Cloud.Types.V1.CIVAppTemplate' required by parameter 'VAppTemplate'.
Specified method is not supported.
At line:2 char:56
+ New-CIVApp -Name ($vAppBaseName + $i) -VAppTemplate <<<< $vappTemplate
+ CategoryInfo : InvalidArgument: (:) [New-CIVApp], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgument,VMware.VimAutomation.Cloud.Commands.Cmdlets.NewCIVApp
New-CIVAppNetwork : Cannot convert 'System.Object[]' to the type 'VMware.VimAutomation.Cloud.Types.V1.OrgNetwork' required by parameter 'ParentOrgNet
work'. Specified method is not supported.
At line:3 char:40
+ New-CIVAppNetwork -ParentOrgNetwork <<<< (Get-OrgNetwork) -VApp ($vAppBaseName + $i) -Direct
+ CategoryInfo : InvalidArgument: (:) [New-CIVAppNetwork], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgument,VMware.VimAutomation.Cloud.Commands.Cmdlets.VApp.NewCiVAppNetwork
Set-CINetworkAdapter : Missing an argument for parameter 'VAppNetwork'. Specify a parameter of type 'VMware.VimAutomation.Cloud.Types.V1.CIVAppNetwor
k' and try again.
At line:4 char:142
+ Get-CIVApp -Name ($vAppBaseName + $i) | Get-CIVM | Get-CINetworkAdapter | Set-CINetworkAdapter -IPAddressAllocationMode Pool -VAppNetwork <<<<
-Connected $true
+ CategoryInfo : InvalidArgument: (:) [Set-CINetworkAdapter], ParameterBindingException
+ FullyQualifiedErrorId : MissingArgument,VMware.VimAutomation.Cloud.Commands.Cmdlets.SetCINetworkAdapter
Thanks again