Skip to content

Instantly share code, notes, and snippets.

@tylergohl
Created October 22, 2016 23:43
Show Gist options
  • Save tylergohl/dc212435e5cf179afa879170bc26cbdd to your computer and use it in GitHub Desktop.
Save tylergohl/dc212435e5cf179afa879170bc26cbdd to your computer and use it in GitHub Desktop.
$rgs = get-azurermresourcegroup | where-object { $_.ResourceGroupName -like "test??" }
ForEach ($rg in $rgs) {
$tags = $rg.Tags
$tags += @{Name="AutoShutdownSchedule";Value="1am -> 1pm, Saturday, Sunday"}
$rg | Set-AzureRmResourceGroup -Tag $tags
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment