New-TagCategory
This cmdlet creates a new tag category on the specified vCenter Server systems with the specified parameters.
Syntax
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required
|
Name | String | named |
|
Specifies the name of the new tag category. |
optional | Cardinality | Cardinality | named |
|
Specifies the cardinality of the tag category. If not specified, the default value is "Single". "Single" means that only a single tag from this category can be assigned to a specific object at a time. "Multiple" means that more than one tag from this category can be assigned to a specific object at a time. |
optional | Description | String | named |
|
Specifies the description of the new tag category. |
optional | EntityType | String[] | named |
|
Defines the type of objects to which the tags in this category will be applicable. If you do not specify this parameter or specify "All" as a value, the tags in this category will be applicable to all valid entity types. This parameter accepts both PowerCLI type names and vSphere API type names. The valid PowerCLI type names are: Cluster, Datacenter, Datastore, DatastoreCluster, DistributedPortGroup, DistributedSwitch, Folder, ResourcePool, VApp, VirtualMachine, VM, VMHost, ContentLibrary, ContentLibraryItem, Network, HostNetwork, OpaqueNetwork. For non-PowerCLI types, a namespace prefix is required. Example: 'urn:vim25:VirtualMachine' |
optional | ProgressAction | ActionPreference | named |
|
|
optional | Server | VIServer[] | named |
|
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.TagCategoryExamples
Example 1
New-TagCategory -Name "MyTagCategory" -Cardinality "Single" -EntityType "VirtualMachine"
Creates a new tag category, named "MyTagCategory", defining the "VirtualMachine" type as applicable to the tags inside that category and specifying that only a single tag from that category can be assigned to a specific VirtualMachine object at a time.
Example 2
New-TagCategory -Name "MyTagCategory" -Cardinality "Multiple" -Description "MyTagCategory description"
Creates a new tag category, named "MyTagCategory", that has "MyTagCategory description" set as a description and specifies that multiple tags from that category can be assigned to an object. Tags from this category are applicable to all valid entity types.
Related Commands
Tag
This cmdlet retrieves the tags available on a vCenter Server system.
This cmdlet creates a new tag in the specified tag category with the specified parameters.
This cmdlet removes the specified tags from the server.
This cmdlet modifies the specified tags.
TagAssignment
This cmdlet retrieves the tag assignments of objects.
This cmdlet assigns the specified tag(s) to the specified entity(s).
This cmdlet removes the specified tag assignment.
TagCategory
This cmdlet retrieves the tag categories available on a vCenter Server system and filters them using the specified cmdlet parameters.
This cmdlet creates a new tag category on the specified vCenter Server systems with the specified parameters.
This cmdlet removes the specified tag categories from the server.
This cmdlet modifies the specified tag categories.