What is the difference between the New-AZTag and Update-AZTag command in Azure PowerShell?

PowerShellMicrosoft TechnologiesSoftware & Coding

New-AZTag

When we use the New-AZTag command, it removes all the tags from the particular resource and adds a new tag. This command is generally helpful when we are creating a new resource and we want to apply the tag for it.

Update-AZTag

When we use the Update-AZTag command, it updates, deletes, and replaces the Azure tags. We need to make sure that when we are applying the tag to any existing resource which is already tagged, the Update-AZTag command should be used otherwise New-AZTag command will remove all the previous applied tags and it will add new tags.

raja
Published on 06-Apr-2021 07:52:35
Advertisements