< Back

New-NsxEdge

Sat Jan 18, 2020 9:15 pm

NAME New-NsxEdge



SYNOPSIS

Creates a new NSX Edge Services Gateway.





SYNTAX

New-NsxEdge -Name <String> -ResourcePool <ResourcePoolInterop> -Datastore <DatastoreInterop> [-Username <String>]

[-Password <String>] [-HADatastore <DatastoreInterop>] [-FormFactor <String>] [-VMFolder <FolderInterop>] [-Tenant

<String>] [-Hostname <String>] [-EnableSSH] [-AutoGenerateRules] [-FwEnabled] [-FwDefaultPolicyAllow]

[-FwLoggingEnabled] [-EnableHa] [-HaDeadTime <Int32>] [-HaVnic <Int32>] [-EnableSyslog] [-SyslogServer <String[]>]

[-SyslogProtocol <String>] -Interface <XmlElement[]> [-Connection <PSObject>] [<CommonParameters>]



New-NsxEdge -Name <String> -Cluster <ClusterInterop> -Datastore <DatastoreInterop> [-Username <String>] [-Password

<String>] [-HADatastore <DatastoreInterop>] [-FormFactor <String>] [-VMFolder <FolderInterop>] [-Tenant <String>]

[-Hostname <String>] [-EnableSSH] [-AutoGenerateRules] [-FwEnabled] [-FwDefaultPolicyAllow] [-FwLoggingEnabled]

[-EnableHa] [-HaDeadTime <Int32>] [-HaVnic <Int32>] [-EnableSyslog] [-SyslogServer <String[]>] [-SyslogProtocol

<String>] -Interface <XmlElement[]> [-Connection <PSObject>] [<CommonParameters>]





DESCRIPTION

An NSX Edge Service Gateway provides all NSX Edge services such as firewall,

NAT, DHCP, VPN, load balancing, and high availability. Each NSX Edge virtual

appliance can have a total of ten uplink and internal network interfaces and

up to 200 subinterfaces. Multiple external IP addresses can be configured

for load balancer, site???????????????to???????????????site VPN, and NAT services.



ESGs support interfaces connected to either VLAN backed port groups or NSX

Logical Switches.



PowerCLI cmdlets such as Get-VDPortGroup and Get-Datastore require a valid

PowerCLI session.





PARAMETERS

-Name <String>

Name of the edge appliance.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ResourcePool <ResourcePoolInterop>

Resource pool into which to deploy the Edge.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Cluster <ClusterInterop>

DRS Cluster into which to deploy the Edge.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Datastore <DatastoreInterop>

Datastore onto which to deploy the edge appliance (If HA is enabled, use -HADatastore to specify an alternate

location if desired.)



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Username <String>

Cli account username.



Required? false

Position? named

Default value admin

Accept pipeline input? false

Accept wildcard characters? false



-Password <String>

CLI account password



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-HADatastore <DatastoreInterop>

Datastore onto which to deploy the HA edge appliance (Best practice is to use an alternative datastore/array

to the first edge appliance in a HA pair. Defaults to the same datastore as the first appliance.)



Required? false

Position? named

Default value $datastore

Accept pipeline input? false

Accept wildcard characters? false



-FormFactor <String>

Formfactor for the deploye dedge appliance.



Required? false

Position? named

Default value compact

Accept pipeline input? false

Accept wildcard characters? false



-VMFolder <FolderInterop>

VI folder into which to place the edge in the VMs and Templates inventory.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Tenant <String>

Optional tenant string.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Hostname <String>

DNS hostname to configure on the edge appliance. Defaults to the edge name.



Required? false

Position? named

Default value $Name

Accept pipeline input? false

Accept wildcard characters? false



-EnableSSH [<SwitchParameter>]

Enable SSH



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-AutoGenerateRules [<SwitchParameter>]

Enable autogeneration of edge firewall rules for enabled services. Defaults to $true



Required? false

Position? named

Default value True

Accept pipeline input? false

Accept wildcard characters? false



-FwEnabled [<SwitchParameter>]

Enable edge firewall. Defaults to $true.



Required? false

Position? named

Default value True

Accept pipeline input? false

Accept wildcard characters? false



-FwDefaultPolicyAllow [<SwitchParameter>]

Set default firewall rule to allow. Defaults to $false.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-FwLoggingEnabled [<SwitchParameter>]

Enable Firewall Logging. Defaults to $true.



Required? false

Position? named

Default value True

Accept pipeline input? false

Accept wildcard characters? false



-EnableHa [<SwitchParameter>]

Enable HA on the deployed Edge. Defaults to $false.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-HaDeadTime <Int32>

Configure the Edge Appliance Dead Time.



Required? false

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-HaVnic <Int32>

Configure the vNIC index used to send HA heartbeats.



Required? false

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-EnableSyslog [<SwitchParameter>]

Enable syslog. Defaults to $false.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-SyslogServer <String[]>

Configure the syslog server.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SyslogProtocol <String>

Configure the syslog protocol.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Interface <XmlElement[]>

Define the Edge Interface configuration. Specify a collection of one or more interface specs as created by

New-NsxEdgeInterfaceSpec.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Connection <PSObject>

PowerNSX Connection object



Required? false

Position? named

Default value $defaultNSXConnection

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Create interface specifications first for each interface that you want on the ESG



PS C:\\> $vnic0 = New-NsxEdgeInterfaceSpec -Index 0 -Name Uplink -Type Uplink

-ConnectedTo (Get-VDPortgroup Corp) -PrimaryAddress "1.1.1.2"

-SubnetPrefixLength 24



PS C:\\> $vnic1 = New-NsxEdgeInterfaceSpec -Index 1 -Name Internal -Type Uplink

-ConnectedTo $LogicalSwitch1 -PrimaryAddress "2.2.2.1"

-SecondaryAddresses "2.2.2.2" -SubnetPrefixLength 24



Then create the Edge Services Gateway

PS C:\\> New-NsxEdge -name DMZ_Edge_2

-Cluster (get-cluster Cluster1) -Datastore (get-datastore Datastore1)

-Interface $vnic0,$vnic1 -Password 'Pass'











RELATED LINKS