Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save andrewmatveychuk/7e4e102b84b30f416cdb886d4fa6cac2 to your computer and use it in GitHub Desktop.
Save andrewmatveychuk/7e4e102b84b30f416cdb886d4fa6cac2 to your computer and use it in GitHub Desktop.
Sample Azure Policy rule to evaluate Windows Client VMs for Azure Hybrid Benefit usage
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Compute/virtualMachines"
},
{
"field": "Microsoft.Compute/imagePublisher",
"equals": "MicrosoftWindowsDesktop"
},
{
"field": "Microsoft.Compute/imageOffer",
"in": "[[parameters('imageOffers')]"
},
{
"field": "Microsoft.Compute/virtualMachines/licenseType",
"notEquals": "Windows_Client"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment