< Back

New-TagCategory

Sun Jan 19, 2020 7:01 pm

NAME New-TagCategory



SYNOPSIS

This cmdlet creates a new tag category on the specified vCenter Server systems with the specified parameters.





SYNTAX

New-TagCategory [-Name] <String> [-Cardinality <Cardinality>] [-Description <String>] [-EntityType <String[]>]

[-Server <VIServer[]>] [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

This cmdlet creates a new tag category on the specified vCenter Server systems with the specified parameters.





PARAMETERS

-Cardinality <Cardinality>

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.



Required? false

Position? named

Default value Single

Accept pipeline input? False

Accept wildcard characters? false



-Description <String>

Specifies the description of the new tag category.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-EntityType <String[]>

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, VirtualPortGroup, VirtualMachine, VM, VMHost.



For non-PowerCLI types, a namespace prefix is required. Example: 'urn:vim25:VirtualMachine'



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Name <String>

Specifies the name of the new tag category.



Required? true

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-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? True (ByValue)

Accept wildcard characters? true



-Confirm [<SwitchParameter>]

If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false,

the cmdlet runs without asking for user confirmation.



Required? false

Position? named

Default value $true

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are

modified.



Required? false

Position? named

Default value False

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

The newly created TagCategory object







NOTES





Works only with vCenter Server 5.1 or later.



-------------------------- 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 LINKS

Online Version: https://code.vmware.com/doc/preview?id= ... egory.html

Get-TagCategory

Remove-TagCategory

Set-TagCategory