Get-TagAssignment

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.

Syntax

[-Category  <TagCategory[]>]
[-Entity  <VIObjectCore[]>]
[-Server  <VIServer[]>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional
Category
TagCategory[] named
  • wildcards
  • Returns the tags that belong to the specified categories.
    optional
    Entity
    VIObjectCore[] named
  • wildcards
  • pipeline
  • Retrieves the tags associated with the specified items.
    optional
    Server
    VIServer[] named
  • wildcards
  • Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null 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.

    Output

    VMware.VimAutomation.ViCore.Types.V1.Tagging.TagAssignment

    Examples


    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 Commands

    Feedback

    Was this page helpful?