< Back
Get-TagAssignment
Post
NAME Get-TagAssignment
SYNOPSIS
This cmdlet retrieves the tag assignments of objects.
SYNTAX
Get-TagAssignment [[-Entity] <VIObjectCore[]>] [-Category <TagCategory[]>] [-Server <VIServer[]>]
[<CommonParameters>]
DESCRIPTION
This cmdlet retrieves the tag assignments of objects. If the Entity parameter is specified, the cmdlet returns
only the tag assignments for the corresponding items. If the Category parameter is specified, the cmdlet returns
only the tag assignments of tags that belong to the specified category.
PARAMETERS
-Category <TagCategory[]>
Returns the tags that belong to the specified categories.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Entity <VIObjectCore[]>
Retrieves the tags associated with the specified items.
Required? false
Position? 1
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? true
-Server <VIServer[]>
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this
parameter, the command runs on the default servers. For more information about default servers, see the
description of Connect-VIServer.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? true
<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
Zero or more TagAssignment objects
NOTES
Works only with vCenter Server 5.1 or later.
-------------------------- Example 1 --------------------------
$datastore = Get-DataStore MyDatastore
Get-TagAssignment -Entity $datastore -Category MyCategory
Retrieves all tag assignments for the $datastore entity that have tags from the "MyCategory" category.
RELATED LINKS
Online Version: https://code.vmware.com/doc/preview?id= ... nment.html
Get-Tag
New-TagAssignment
Remove-TagAssignment
SYNOPSIS
This cmdlet retrieves the tag assignments of objects.
SYNTAX
Get-TagAssignment [[-Entity] <VIObjectCore[]>] [-Category <TagCategory[]>] [-Server <VIServer[]>]
[<CommonParameters>]
DESCRIPTION
This cmdlet retrieves the tag assignments of objects. If the Entity parameter is specified, the cmdlet returns
only the tag assignments for the corresponding items. If the Category parameter is specified, the cmdlet returns
only the tag assignments of tags that belong to the specified category.
PARAMETERS
-Category <TagCategory[]>
Returns the tags that belong to the specified categories.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Entity <VIObjectCore[]>
Retrieves the tags associated with the specified items.
Required? false
Position? 1
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? true
-Server <VIServer[]>
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this
parameter, the command runs on the default servers. For more information about default servers, see the
description of Connect-VIServer.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? true
<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
Zero or more TagAssignment objects
NOTES
Works only with vCenter Server 5.1 or later.
-------------------------- Example 1 --------------------------
$datastore = Get-DataStore MyDatastore
Get-TagAssignment -Entity $datastore -Category MyCategory
Retrieves all tag assignments for the $datastore entity that have tags from the "MyCategory" category.
RELATED LINKS
Online Version: https://code.vmware.com/doc/preview?id= ... nment.html
Get-Tag
New-TagAssignment
Remove-TagAssignment