< Back

Remove-NsxDynamicCriteria

Sat Jan 18, 2020 9:20 pm

NAME Remove-NsxDynamicCriteria



SYNOPSIS

Removes the specified Dynamic Criteria from the specified Dynamic Member Set.





SYNTAX

Remove-NsxDynamicCriteria [-DynamicCriteria] <Object> [-NoConfirm] [-Connection <PSObject>] [<CommonParameters>]



Remove-NsxDynamicCriteria [-DynamicCriteria] <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 Criteria as retrieved by

Get-NsxDynamicCriteria from the given Dymanic Member Set of which it is a

member.





PARAMETERS

-DynamicCriteria <Object>

SecurityGroup to retrieve Dynamic Sets from.



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 webapp | Get-NsxDynamicMemberSet | Get-NsxDynamicCriteria -index 1 |

Remove-NsxDynamicCriteria



Index MemberSetIndex SecurityGroupName Key Condition Value

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

1 1 webapp VMName contains webapp

2 1 webapp SecurityTag contains webapp

3 1 webapp ComputerName contains webapp

1 2 webapp ENTITY belongs_to vm-3964

2 2 webapp SecurityTag equals webapp

1 3 webapp ENTITY belongs_to vm-3961



Removes the first Dynamic Criteria from ALL Dynamic Member Sets of the security group webapp. This is probably

not what you want to do.









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



PS C:\\>Get-NsxSecurityGroup webapp | Get-NsxDynamicMemberSet -index 1 | Get-NsxDynamicCriteria -index 1 |

Remove-NsxDynamicCriteria



Index MemberSetIndex SecurityGroupName Key Condition Value

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

1 1 webapp VMName contains webapp

2 1 webapp SecurityTag contains webapp

3 1 webapp ComputerName contains webapp



Removes the first Dynamic Criteria from the first Dynamic Member Set of the security group webapp. This probably

IS what you want to do! :)











RELATED LINKS