< Back

Add-NsxIpSetMember

Sat Jan 18, 2020 8:58 pm

NAME Add-NsxIpSetMember



SYNOPSIS

Adds a new member to an existing IP Set.





SYNTAX

Add-NsxIpSetMember [-IPSet] <XmlElement> -IPAddress <String[]> [-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 adds a new member to the specified IP Set.



IPAddress is a collection of strings, each of which can contain 1 only of

the following



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

-IPSet <XmlElement>

Existing IPSet PowerNSX object to be modified.



Required? true

Position? 2

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-IPAddress <String[]>

Collection of ip addresses/ranges and/or CIDR's to be added to the ipset.



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:\\>get-nsxipset test | Add-NsxIpSetMember -IPAddress 5.4.3.2



Adds the ip address 5.4.3.2 to the existing ipset test.









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



PS C:\\>get-nsxipset test | Add-NsxIpSetMember -IPAddress 5.4.3.0/24



Adds the cidr 5.4.3.0/24 to the existing ipset test









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



PS C:\\>get-nsxipset test | Add-NsxIpSetMember -IPAddress 5.4.3.2,1.2.3.0/24



Adds the ip address 5.4.3.2 and the cidr 1.2.3.0/24 to the existing ipset

test











RELATED LINKS