PowerCLI Reference

New-CIVAppNetwork

Synopsis

This cmdlet creates a new vApp network.

Syntax

New-CIVAppNetwork -Direct -ParentOrgVdcNetwork <OrgNetworkBase> -VApp <CIVApp> [-RunAsync] [-Server <CIServer[]>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

New-CIVAppNetwork [-DisableFirewall] [-ParentOrgVdcNetwork <OrgNetworkBase>] -VApp <CIVApp> [-RunAsync] [-Server <CIServer[]>] -Routed [-Description <String>] [-DnsSuffix <String>] -Gateway <IPAddress> -Name <String> -Netmask <IPAddress> [-PrimaryDns <IPAddress>] [-SecondaryDns <IPAddress>] [-StaticIPPool <IPRangeList>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVAppNetwork
Remove-CIVAppNetwork
Set-CIVAppNetwork

Detailed Description

This cmdlet creates a new vApp network.
* To create a direct vApp network, specify the Direct parameter.
* To create a routed vApp network, specify the Routed parameter.
* To create an isolated vApp network, specify the Routed parameter but do not specify the ParentOrgNetwork parameter.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
ConfirmSwitchParameterIf the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.falsefalse
DescriptionStringSpecifies a description for the vApp network that you want to create.falsefalse
DirectSwitchParameterIndicates that you want to create a vApp network that is directly connected to a parent organization network. When the Direct parameter is specified, you cannot specify the Routed parameter.truefalse
DisableFirewallSwitchParameterIndicates that you want to create a vApp network with a disabled firewall service. By default, when the Routed parameter is specified, the vApp network is created with an enabled firewall service.falsefalse
DnsSuffixStringSpecifies a DNS suffix for the vApp network that you want to create.falsefalse
GatewayIPAddressSpecifies the default gateway for the vApp network that you want to create.truefalse
InformationActionActionPreferencefalsefalse
InformationVariableStringfalsefalse
NameStringSpecifies a name for the vApp network that you want to create.truefalse
NetmaskIPAddressSpecifies a network mask for the vApp network that you want to create.truefalse
ParentOrgVdcNetworkOrgNetworkBaseSpecifies the parent organization vDC network to which the vApp network connects. Do not specify this parameter if you want to create an isolated vApp network.truefalse
PipelineVariableStringfalsefalse
PrimaryDnsIPAddressSpecifies a primary DNS for the vApp network that you want to create.falsefalse
RoutedSwitchParameterIndicates that you want to create a routed network. To create an isolated network, specify the Routed parameter but do not specify the ParentOrgParameter.
When the Routed parameter is specified, you cannot specify the Direct parameter.
truefalse
RunAsyncSwitchParameterIndicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the VMware PowerCLI console.falsefalse
SecondaryDnsIPAddressSpecifies a secondary DNS for the vApp network you want to create.falsefalse
ServerCIServer[]Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer.falsefalse
StaticIPPoolIPRangeListSpecifies a range of static IP addresses for the vApp network to allocate to virtual machines. For example, "192.168.10.0 - 192.168.10.50, 192.168.10.100 - 192.168.10.150".falsefalse
VAppCIVAppSpecifies the vApp for which you want to create a vApp network.truetrue (ByValue)
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

The newly created CIVAppNetwork object

Notes

Examples

-------------- Example 1 --------------

$myVApp = Get-CIVApp -Name 'MyVApp'
$parentOrgNetwork = Get-OrgNetwork -Name 'MyParentOrganizationNetwork'
New-CIVAppNetwork -ParentOrgNetwork $parentOrgNetwork -VApp $myVApp -Routed -Description 'This is my routed network.' -DnsSuffix 'mydomain.com' -Gateway '192.168.3.3' -Name 'MyRoutedNetwork' -Netmask '255.255.255.0' -PrimaryDns '192.168.3.1' -SecondaryDns '192.168.3.2' -StaticIPPool '192.168.3.100 - 92.168.3.120'

Creates a new routed vApp network with the specified configuration.

-------------- Example 2 --------------

$myVApp = Get-CIVApp -Name 'MyVApp'
New-CIVAppNetwork -ParentOrgNetwork $null -VApp $myVApp -Routed -Description 'This is my isolated network.' -DnsSuffix 'mydomain.com' -Gateway '192.168.3.3' -Name 'MyIsolatedNetwork' -Netmask '255.255.255.0' -PrimaryDns '192.168.3.1' -SecondaryDns '192.168.3.2' -StaticIPPool '192.168.3.100 - 192.168.3.120'

Createsa new isolated vApp network with the specified configuration.

-------------- Example 3 --------------

$myVApp = Get-CIVApp -Name 'MyVApp'
$parentOrgNetwork = Get-OrgNetwork -Name 'MyParentOrganizationNetwork'
New-CIVAppNetwork -ParentOrgNetwork $parentOrgNetwork -VApp $myVApp ?Direct

Creates a new direct vApp network.


Copyright © VMware, Inc. All rights reserved.