< Back

New-NsxIpSet

Sat Jan 18, 2020 9:16 pm

NAME New-NsxIpSet



SYNOPSIS

Creates a new NSX IPSet.





SYNTAX

New-NsxIpSet [-Name] <String> [[-Description] <String>] [[-IPAddress] <String[]>] [[-scopeId] <String>]

[-Universal] [-EnableInheritance] [-ReturnObjectIdOnly] [[-Connection] <PSObject>] [<CommonParameters>]





DESCRIPTION

An NSX IPSet is a grouping construct that allows for grouping of

IP adresses, ranges and/or subnets in a sigle container that can

be used either in DFW Firewall Rules or as members of a security

group.



This cmdlet creates a new IP Set with the specified parameters.



IPAddress is a string that can contain 1 or more of the following

separated by commas

IP address: (eg, 1.2.3.4)

IP Range: (eg, 1.2.3.4-1.2.3.10)

IP Subnet: (eg, 1.2.3.0/24)





PARAMETERS

-Name <String>

Name of the IpSet.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Description <String>

Descript of the IPSet.



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-IPAddress <String[]>

Single string of comma separated ipaddresses, or a collection of ip address strings.



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-scopeId <String>

Scope of object. For universal object creation, use the -Universal switch.



Required? false

Position? 4

Default value globalroot-0

Accept pipeline input? false

Accept wildcard characters? false



-Universal [<SwitchParameter>]

Create the IPSet as Universal object.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-EnableInheritance [<SwitchParameter>]

Create the IPSet with the inheritance set. Allows the IP Set to be used at a lower scope.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-ReturnObjectIdOnly [<SwitchParameter>]

Return the objectid as a string rather than the whole XML object.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Connection <PSObject>

PowerNSX Connection object



Required? false

Position? 5

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:\\>New-NsxIPSet -Name TestIPSet -Description "Testing IP Set Creation"



-IPAddress "1.2.3.4,1.2.3.0/24"



Creates a new IP Set in the scope globalroot-0.









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



PS C:\\>New-NsxIPSet -Name UniversalIPSet -Description "Testing Universal"



-IPAddress "1.2.3.4,1.2.3.0/24" -Universal



Creates a new Universal IP Set.









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



PS C:\\>New-NsxIPSet -Name EdgeIPSet -Description "Testing Edge IP Sets"



-IPAddress "1.2.3.4,1.2.3.0/24" -scopeId edge-1



Creates a new IP Set on the specified edge..











RELATED LINKS