none
Get-AzureRmConsumptionUsageDetail -Tag example RRS feed

  • Question

  • I am looking for an exmple to get cost by applying tag in a subscription. I found Get-AzureRmConsumptionUsageDetail -Tag but I can not make it to work. Please let me know if this is a good example to use or any suggestion.

    Here is the doc that I am referring to.

    Tuesday, February 26, 2019 4:48 PM

All replies

  • What Azure subscription are you using?

    The following limitations apply to tags:

    Not all resource types support tags. To determine if you can apply a tag to a resource type, see Tag support for Azure resources.

    Each resource or resource group can have a maximum of 15 tag name/value pairs. This limitation applies only to tags directly applied to the resource group or resource. A resource group can contain many resources that each have 15 tag name/value pairs. If you have more than 15 values that you need to associate with a resource, use a JSON string for the tag value. The JSON string can contain many values that are applied to a single tag name. This article shows an example of assigning a JSON string to the tag.

    The tag name is limited to 512 characters, and the tag value is limited to 256 characters. For storage accounts, the tag name is limited to 128 characters, and the tag value is limited to 256 characters.

    Virtual Machines are limited to a total of 2048 characters for all tag names and values.

    Tags applied to the resource group are not inherited by the resources in that resource group.

    Tags can't be applied to classic resources such as Cloud Services.

    Tag names can't contain these characters: <, >, %, &, \, ?, /

    Reference: https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-using-tags

    Wednesday, February 27, 2019 7:30 AM
    Moderator
  • I too am having the same problem.

    Get-AzureRmConsumptionUsageDetail works fine, until I use a "-Tag" entry.  Then it just outputs everything, and even ignores the -StartDate and -EndDate parameters.

    module version 0.3.7

    PS version 5.1.17134.590

    A pointer to a working example would be nice.

    Friday, April 26, 2019 6:27 PM