< Back

Remove-NsxDynamicMemberSet

Sat Jan 18, 2020 9:20 pm

NAME Remove-NsxDynamicMemberSet



SYNOPSIS

Removes the specified Dynamic Member Set from a security groups Dynamic

Membership definition.





SYNTAX

Remove-NsxDynamicMemberSet [-DynamicMemberSet] <Object> [-NoConfirm] [-Connection <PSObject>] [<CommonParameters>]



Remove-NsxDynamicMemberSet [-DynamicMemberSet] <Object> [-Confirm] [-Connection <PSObject>] [<CommonParameters>]





DESCRIPTION

NSX Security Groups can have 3 types of membership configured, Dynamic

Criteria, Static Members and Exclude Members.



One or more Dynamic Criteria combine to make a Dynamic Member Set, and one

or more Dynamic Member Sets combine to define the Dynamic Membership of a

given security group.



In order to allow the configuration of a security groups Dynamic Membership

with an aritrary number of Dynamic Criteria Member Sets that contain an

arbitrary number of Dynamic Criteria in a flexible way, PowerNSX provides

the following abstractions.



Creation of individual Dynamic Criteria is accomplished with

New-NsxDynamicCriteriaSpec.



One or more Dynamic Criteria can be added to a Dynamic Member Set at creation

time with Add-NsxDynamicMemberSet and specifying the required Dynamic

Criteria Spec objects at creation time.



One or more Dynamic Criteria can be added to an existing Dynamic Member Set

after the fact with Add-NsxDynamicCriteria or removed with

Remove-NsxDynamicCriteria.



One or more Dynamic Member sets can be added to a security groups overall

Dynamic Membership definition using Add-NsxDynamicMemberSet or removed using

Remove-NsxDynamicMemberSet



A Security Groups Dynamic Member definition can include multiple Dynamic

Member Sets in an logical AND/OR arrangement, and for each of the Dynamic

Member Sets, a match operator of ALL or ANY can be specified that determines

how multiple Dynamic Criteria combine within the set to define a match.



This cmdlet removes the specified Dynamic Member Set as retrieved by

Get-NsxDynamicMemberSet from the Security Group it is defined within.





PARAMETERS

-DynamicMemberSet <Object>

Dynamic member set to remove.



Required? true

Position? 2

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompt for confirmation. Specify as -confirm:$false to disable confirmation prompt



Required? false

Position? named

Default value True

Accept pipeline input? false

Accept wildcard characters? false



-NoConfirm [<SwitchParameter>]

Disable Prompt for confirmation.



Required? false

Position? named

Default value False

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-NsxSecurityGroup Prod-WindowsServer | Get-NsxDynamicMemberSet



Index SecurityGroupName SetOperator CriteriaString

----- ----------------- ----------- --------------

1 Prod-WindowsServer Match: ANY, VMName contains Windows, ComputerName regex *win*

2 Prod-WindowsServer OR Match: ANY, OSName contains Win



PS C:\\> Get-NsxSecurityGroup Prod-WindowsServer | Get-NsxDynamicMemberSet -index 1 | Remove-NsxDynamicMemberSet



Removes the first dynamic member set from the dynamic member definition of the security group Prod-WindowsServer











RELATED LINKS