How to update Tag for all VM in particular Resource Group

Small script to remember how to update Tag for all VM in particular resource group:

$tags = @{“tag01″=”x2”; “tag02″=”x2”; “tag03″=”x0”}
Get-AzResource -ResourceGroup todelete -resourcetype Microsoft.Compute/virtualMachines| Update-AzTag -Tag $tags -Operation Merge