Azure Snapshot Add Tagging

Gaurav Singh 130 Reputation points
2023-08-25T12:29:31.2933333+00:00

Hello Team,

I am not able to tag the Azure SNapshot with below commands, can you please review if I am making some mistake or what changes are required here.

User's image

Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,529 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sumarigo-MSFT 47,466 Reputation points Microsoft Employee Moderator
    2023-09-04T10:16:39.6433333+00:00

    @Gaurav Singh

    Create a snapshot of the managed disk using the New-AzSnapshot cmdlet. For example:

    $<span class=" active-doc-0" data-doc-items="0">snapshot = New-AzSnapshot -SnapshotName "mySnapshot" -SourceUri $disk.Id -ResourceGroupName "myResourceGroup[1](#doc-pos=0)</span>"
    Add tags to the snapshot using the Set-AzSnapshot cmdlet1. For example:
    $tags = @{
        "Environment" = "Production"
        "Application" = "MyApp"
    }
    Set-AzSnapshot -Snapshot $snapshot -Tags $tags
    

    This will add two tags to the snapshot: "Environment" with a value of "Production" and "Application" with a value of "MyApp".

    Please note that the specific commands you need to use may vary depending on your environment and requirements. If you continue to have issues, please provide more information about the specific error messages you are seeing and the commands you are using.

    This article gives idea, how to Apply tags with Azure PowerShell

    Apply tags with Azure PowerShell

    Reference link : New-AzSnapshot

    Please let us know if you have any further queries. I’m happy to assist you further.


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

  2. Gaurav Singh 130 Reputation points
    2023-12-29T12:38:05.4+00:00

    Hi
    Sumarigo-MSFT , please note that this is not working , can you please test and send me the update.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.