Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Remove-AzureTag

Remove-AzureTag

microsoft.azure.commands.tags.dll

Synopsis

Deletes predefined Azure tags or values

Syntax

Remove-AzureTag [-Name] [-Value] [-Force] [-PassThru] [<CommonParameters>]

Detailed Description

The Remove-AzureTag cmdlet deletes predefined Azure tags and values from your subscription. To delete particular values from a predefined tag, use the Value parameter. By default, Remove-AzureTag deletes the specified tag and all of its values.You cannot delete a tag or value that is currently applied to a resource or resource group. Before using Remove-AzureTag, use the Tag parameter of the Set-AzureResource or Set-AzureResourceGroup cmdlets to delete the tag or values from the resource or resource group. The Remove-AzureTag cmdlet is part of a set of cmdlets (New/Get/Remove) that help you to manage your predefined Azure tags.An Azure "tag" is a name-value pair that you can use to categorize your Azure resources and resource groups, such as by department or cost center, or to track notes or comments about the resources and groups.You can define and apply tags in a single step, but predefined tags let you establish standard, consistent, predictable names and values for the tags in your subscription. If the subscription includes any predefined tags, you cannot apply undefined tags or values to any resource or resource group in the subscription.

Parameters

-Name <String>

Specifies the name of the tag to be deleted. This parameter is required. By default, Remove-AzureTag removes the specified tag and all of its values. To delete selected values, but not delete the tag, use the Value parameter.

Aliases

None

Required?

true

Position

0

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Value <String[]>

Deletes the specified values from the predefined tag, but does not delete the tag.

Aliases

None

Required?

false

Position

1

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Force <SwitchParameter>

Suppresses the confirmation prompt. By default, Remove-AzureTag prompts for confirmation before deleting a predefined Azure tag.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-PassThru <SwitchParameter>

Returns an object that represents the deleted tag or the resulting tag with deleted valued.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

Input Type

None

Return Type

None or Microsoft.Azure.Commands.Tags.Model.PSTag

Notes

Examples

-------------------------- Example 1: Delete a predefined tag --------------------------

This command deletes the predefined Department tag and all of its resources. If the tag has been applied to any resources or resource groups, the command fails.

PS C:\>Remove-AzureTag -Name Department

-------------------------- Example 2: Delete a value from a predefined tag --------------------------

This command deletes the HumanResources value from the predefined Department tag. It does not delete the tag. If the value has been applied to any resources or resource groups, the command fails.

PS C:\>Remove-AzureTag -Name Department -Value HumanResources -PassThru
Name:   Department

Count:  14

Values: 

        Name        Count

        =========   =====

        Finance        2

        IT            12

Online Version
Get-AzureTag
New-AzureTag