< Back

New-NsxFirewallSection

Sat Jan 18, 2020 9:16 pm

NAME New-NsxFirewallSection



SYNOPSIS

Creates a new NSX Distributed Firewall Section.





SYNTAX

New-NsxFirewallSection [-Name] <String> [[-sectionType] <String>] [[-scopeId] <String>] [-Universal] [[-position]

<String>] [[-anchorId] <String>] [[-Connection] <PSObject>] [<CommonParameters>]





DESCRIPTION

An NSX Distributed Firewall Section is a named portion of the firewall rule

set that contains firewall rules.



This cmdlet create the specified NSX Distributed Firewall Section.

By default this cmdlet creates a section at the top of the ruleset. It is

possible to create the section at the top or bottom (before default) of the

ruleset by using the position parameter. The position parameter can also be

used to specify the section be created before or after an existing section.

The existing section Id will need to be supplied as the anchor Id.





PARAMETERS

-Name <String>



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-sectionType <String>



Required? false

Position? 2

Default value layer3sections

Accept pipeline input? false

Accept wildcard characters? false



-scopeId <String>



Required? false

Position? 3

Default value globalroot-0

Accept pipeline input? false

Accept wildcard characters? false



-Universal [<SwitchParameter>]

Marks the firewall section to be universal or not



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-position <String>

Identifies where to insert the newly created section. after & before must specify an existing section id as

the anchor.



Required? false

Position? 4

Default value top

Accept pipeline input? false

Accept wildcard characters? false



-anchorId <String>

ID of an existing section to use as an anchor for the new section.



Required? false

Position? 5

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Connection <PSObject>

PowerNSX Connection object



Required? false

Position? 6

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>New-NsxFirewallSection -Name TestSection



Creates a new Layer 3 firewall section at the top of the rulebase









-------------------------- EXAMPLE 2 --------------------------



PS>New-NsxFirewallSection -Name TestL2Section -sectionType layer2sections



Creates a new Layer 2 firewall section at the top of the rulebase.









-------------------------- EXAMPLE 3 --------------------------



PS>New-NsxFirewallSection -Name TestL3RedirectSection -sectionType layer3redirectsections



Creates a new Layer 3 redirect firewall section at the top of the rulebase.









-------------------------- EXAMPLE 4 --------------------------



PS>New-NsxFirewallSection -Name TestAtBottom -position bottom



Creates a new Layer 3 firewall section before the default section.









-------------------------- EXAMPLE 5 --------------------------



PS>New-NsxFirewallSection -Name TestAtTop -position top



Creates a new Layer 3 firewall section at the top of the rulebase.









-------------------------- EXAMPLE 6 --------------------------



PS>New-NsxFirewallSection -Name TestBeforeExisting -position before -anchorId 1024



Creates a new Layer 3 firewall section before the existing section with an ID of 1024.









-------------------------- EXAMPLE 7 --------------------------



PS>New-NsxFirewallSection -Name TestAfterExisting -position after -anchorId 1024



Creates a new Layer 3 firewall section after the existing section with an ID of 1024.









-------------------------- EXAMPLE 8 --------------------------



PS>$section = Get-NsxFirewallSection blah



PS> New-NsxFirewallSection -Name TestBeforeExisting -position before -anchorId $section.id



Creates a new Layer 3 firewall section before the existing section named blah.











RELATED LINKS