< Back
Get-NsxSecurityTagAssignment
Post
NAME Get-NsxSecurityTagAssignment
SYNOPSIS
This cmdlet is used to retrive a list of virtual machines assigned a
particular NSX Security Tag.
SYNTAX
Get-NsxSecurityTagAssignment -SecurityTag <XmlElement> [-Connection <PSObject>] [<CommonParameters>]
Get-NsxSecurityTagAssignment -VirtualMachine <Object[]> [-Connection <PSObject>] [<CommonParameters>]
DESCRIPTION
A NSX Security Tag is a arbitrary string. It is used in other functions of
NSX such as Security Groups match criteria. Security Tags are applied to a
Virtual Machine.
This cmdlet is used to retrive a list of virtual machines assigned a
particular NSX Security Tag.
PARAMETERS
-SecurityTag <XmlElement>
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-VirtualMachine <Object[]>
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
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-NsxSecurityTag ST-Web-DMZ | Get-NsxSecurityTagAssignment
Specify a single security tag to find all virtual machines the tag is assigned to.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-NsxSecurityTag | where-object { $_.name -like "*dmz*" } | Get-NsxSecurityTagAssignment
Retrieve all virtual machines that are assigned a security tag containing 'dmz' in the security tag name
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-VM Web-01 | Get-NsxSecurityTagAssignment
Specify a virtual machine to retrieve all the assigned security tags
RELATED LINKS
SYNOPSIS
This cmdlet is used to retrive a list of virtual machines assigned a
particular NSX Security Tag.
SYNTAX
Get-NsxSecurityTagAssignment -SecurityTag <XmlElement> [-Connection <PSObject>] [<CommonParameters>]
Get-NsxSecurityTagAssignment -VirtualMachine <Object[]> [-Connection <PSObject>] [<CommonParameters>]
DESCRIPTION
A NSX Security Tag is a arbitrary string. It is used in other functions of
NSX such as Security Groups match criteria. Security Tags are applied to a
Virtual Machine.
This cmdlet is used to retrive a list of virtual machines assigned a
particular NSX Security Tag.
PARAMETERS
-SecurityTag <XmlElement>
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-VirtualMachine <Object[]>
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
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-NsxSecurityTag ST-Web-DMZ | Get-NsxSecurityTagAssignment
Specify a single security tag to find all virtual machines the tag is assigned to.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-NsxSecurityTag | where-object { $_.name -like "*dmz*" } | Get-NsxSecurityTagAssignment
Retrieve all virtual machines that are assigned a security tag containing 'dmz' in the security tag name
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-VM Web-01 | Get-NsxSecurityTagAssignment
Specify a virtual machine to retrieve all the assigned security tags
RELATED LINKS