PowerCLI Reference

Get-TagCategory

Synopsis

This cmdlet retrieves the tag categories available on a vCenter Server system and filters them using the specified cmdlet parameters.

Syntax

Get-TagCategory -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]

Get-TagCategory [[-Name] <String[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online Version
New-TagCategory
Remove-TagCategory
Set-TagCategory

Detailed Description

This cmdlet retrieves the tag categories available on a vCenter Server system and filters them using the specified cmdlet parameters.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
NameString[]Filters the tag categories by name.falseFalse
IdString[]Filters the tag categories by ID.


Note: When a list of values is specified for the Id parameter, the returned objects would have an ID that matches exactly one of the string values in that list.
trueFalse
ServerVIServer[]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.falseTrue (ByValue)

Return Type

Zero or more TagCategory objects

Notes

Works only with vCenter Server 5.1 or later.

Examples

-------------------------- Example 1 --------------------------

Get-TagCategory -Name "MyTagCategory" -Server "MyServer"

Retrieves a tag category named "MyTagCategory" from a vCenter Server system.


Copyright © VMware, Inc. All rights reserved.