< Back
Get-NsxDynamicCriteria
Post
NAME Get-NsxDynamicCriteria
SYNOPSIS
Retrieves Dynamic Member Criteria from the specified Dynamic Member Set.
SYNTAX
Get-NsxDynamicCriteria [-DynamicMemberSet] <Object> [-Index <String>] [-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.
Get-NsxDynamicCriteria retrieves Dynamic Member Criteria from the specified
Dynamic Member Set as retrieved by Get-NsxDynamicMemberSet. While
Get-NsxDynamicMemberSet displays a text representation of the Dynamic
Criteria that belong to it, this cmdlet outputs individual objects
representing each criteria such that they can be filtered, and passed to
Remove-NsxDynamicCriteria.
PARAMETERS
-DynamicMemberSet <Object>
Dynamic Member Set to retrieve Dynamic Criteria from.
Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Index <String>
Get Criteria Member by index
Required? false
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-NsxSecurityGroup webapp | Get-NsxDynamicMemberSet | Get-NsxDynamicCriteria | ft
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
Retrieves all Dynamic Criteria from ALL Dynamic Member Sets of the security group webapp. This is probably not
what you want to do.
Output is formatted as a table.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-NsxSecurityGroup webapp | Get-NsxDynamicMemberSet -index 1 | Get-NsxDynamicCriteria | ft
Index MemberSetIndex SecurityGroupName Key Condition Value
----- -------------- ----------------- --- --------- -----
1 1 webapp VMName contains webapp
2 1 webapp SecurityTag contains webapp
3 1 webapp ComputerName contains webapp
Retrieves all Dynamic Criteria from the first Dynamic Member Set of the security group webapp. This probably IS
what you want to do!
Output is formatted as a table.
RELATED LINKS
SYNOPSIS
Retrieves Dynamic Member Criteria from the specified Dynamic Member Set.
SYNTAX
Get-NsxDynamicCriteria [-DynamicMemberSet] <Object> [-Index <String>] [-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.
Get-NsxDynamicCriteria retrieves Dynamic Member Criteria from the specified
Dynamic Member Set as retrieved by Get-NsxDynamicMemberSet. While
Get-NsxDynamicMemberSet displays a text representation of the Dynamic
Criteria that belong to it, this cmdlet outputs individual objects
representing each criteria such that they can be filtered, and passed to
Remove-NsxDynamicCriteria.
PARAMETERS
-DynamicMemberSet <Object>
Dynamic Member Set to retrieve Dynamic Criteria from.
Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Index <String>
Get Criteria Member by index
Required? false
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-NsxSecurityGroup webapp | Get-NsxDynamicMemberSet | Get-NsxDynamicCriteria | ft
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
Retrieves all Dynamic Criteria from ALL Dynamic Member Sets of the security group webapp. This is probably not
what you want to do.
Output is formatted as a table.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-NsxSecurityGroup webapp | Get-NsxDynamicMemberSet -index 1 | Get-NsxDynamicCriteria | ft
Index MemberSetIndex SecurityGroupName Key Condition Value
----- -------------- ----------------- --- --------- -----
1 1 webapp VMName contains webapp
2 1 webapp SecurityTag contains webapp
3 1 webapp ComputerName contains webapp
Retrieves all Dynamic Criteria from the first Dynamic Member Set of the security group webapp. This probably IS
what you want to do!
Output is formatted as a table.
RELATED LINKS