< Back

Add-AzureRmTagToResourceGroup

Sat Jan 11, 2020 10:35 am

NAME Add-AzureRmTagToResourceGroup



SYNOPSIS

Add a tag to an Azure Resource Group





SYNTAX

Add-AzureRmTagToResourceGroup -ResourceGroupName <String> [-TagName <String>] -TagValue <String>

[<CommonParameters>]





DESCRIPTION

Add a tag to an Azure Resource Group





PARAMETERS

-ResourceGroupName <String>

Name of the resource group that you want to work against



Required? true

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-TagName <String>

Name of the tag that you want to apply to the resource



Default value is: "OrganizationName"



Required? false

Position? named

Default value OrganizationName

Accept pipeline input? false

Accept wildcard characters? false



-TagValue <String>

Value of the tag that you want to apply to the resource



Required? true

Position? named

Default value

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



NOTES





Author: M??????tz Jensen (@splaxi)



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Add-AzureRmTagToResourceGroup -ResourceGroupName "DEV" -TagValue "CustomerA"



This will add tag "OrganizationName" with the value "CustomerA" to the

resource group named "DEV".









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-AzureRmSubscriptionExt -SubscriptionName "*DEV*" | Get-AzureRmResourceGroupExt -ResourceGroupName

"*DEV*" |



Add-AzureRmTagToResourceGroup -TagValue "CustomerA"



This will select the subscription that matches the *DEV* search,

find the resource group that matches *DEV* in that subscription

and add the tag "OrganizationName" with the value "CustomerA" to it.











RELATED LINKS