< Back
Set-TagCategory
Post
NAME Set-TagCategory
SYNOPSIS
This cmdlet modifies the specified tag categories.
SYNTAX
Set-TagCategory [-Category] <TagCategory[]> [-AddEntityType <String[]>] [-Cardinality <Cardinality>] [-Description
<String>] [-Name <String>] [-Server <VIServer[]>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
This cmdlet modifies the specified tag categories. The cardinality of a tag category can only be changed from
"Single" to "Multiple".
PARAMETERS
-AddEntityType <String[]>
Adds the specified entity types to the list of types that tags in this category are applicable to. If you
specify "All" as a value, the tags will be applicable to all 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
-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.
The only value that is accepted for this parameter is "Multiple".
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Category <TagCategory[]>
Specifies the tag categories that you want to configure.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? true
-Description <String>
Specifies the new description to set to the tag categories.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Name <String>
Specifies the name to which the specified tag categories will be renamed.
Required? false
Position? named
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 given 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
-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 False
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
One or more modified TagCategory objects
NOTES
Works only with vCenter Server 5.1 or later.
-------------------------- Example 1 --------------------------
Get-TagCategory "MyTagCategory" | Set-TagCategory -Name "MyNewCategoryName" -Description "Update MyTagCategory
description"
Retrieves a tag category named "MyTagCategory" and updates its name and description.
-------------------------- Example 2 --------------------------
$myTagCategory = Get-TagCategory "MyTagCategory"
Set-TagCategory -Category $myTagCategory -Cardinality Multiple -AddEntityType "VirtualMachine"
Retrieves a tag category named "MyTagCategory" and updates it by allowing more than one of its tags to be assigned
to a specific object at a time, as well as adding "VirtualMachine" to the set of applicable entity types.
RELATED LINKS
Online Version: https://code.vmware.com/doc/preview?id= ... egory.html
Get-TagCategory
New-TagCategory
Remove-TagCategory
SYNOPSIS
This cmdlet modifies the specified tag categories.
SYNTAX
Set-TagCategory [-Category] <TagCategory[]> [-AddEntityType <String[]>] [-Cardinality <Cardinality>] [-Description
<String>] [-Name <String>] [-Server <VIServer[]>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
This cmdlet modifies the specified tag categories. The cardinality of a tag category can only be changed from
"Single" to "Multiple".
PARAMETERS
-AddEntityType <String[]>
Adds the specified entity types to the list of types that tags in this category are applicable to. If you
specify "All" as a value, the tags will be applicable to all 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
-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.
The only value that is accepted for this parameter is "Multiple".
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Category <TagCategory[]>
Specifies the tag categories that you want to configure.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? true
-Description <String>
Specifies the new description to set to the tag categories.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Name <String>
Specifies the name to which the specified tag categories will be renamed.
Required? false
Position? named
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 given 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
-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 False
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
One or more modified TagCategory objects
NOTES
Works only with vCenter Server 5.1 or later.
-------------------------- Example 1 --------------------------
Get-TagCategory "MyTagCategory" | Set-TagCategory -Name "MyNewCategoryName" -Description "Update MyTagCategory
description"
Retrieves a tag category named "MyTagCategory" and updates its name and description.
-------------------------- Example 2 --------------------------
$myTagCategory = Get-TagCategory "MyTagCategory"
Set-TagCategory -Category $myTagCategory -Cardinality Multiple -AddEntityType "VirtualMachine"
Retrieves a tag category named "MyTagCategory" and updates it by allowing more than one of its tags to be assigned
to a specific object at a time, as well as adding "VirtualMachine" to the set of applicable entity types.
RELATED LINKS
Online Version: https://code.vmware.com/doc/preview?id= ... egory.html
Get-TagCategory
New-TagCategory
Remove-TagCategory