Azure Policy
An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
808 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello! :)
I am fairly new to Azure Policy, I am trying to create a policy to target windows servers that doesn't have AHUB enabled, however this policy keeps getting Linux machines in aswell.
Why is that, when I state it should be windowsserver or dynamics?
{
"mode": "All",
"policyRule": {
"if": {
"allOf": [
{
"anyOf": [
{
"field": "type",
"equals": "Microsoft.Compute/virtualMachines"
}
]
},
{
"anyOf": [
{
"field": "Microsoft.Compute/virtualMachines/storageProfile.imageReference.publisher",
"equals": "MicrosoftDynamicsAX"
},
{
"field": "Microsoft.Compute/virtualMachines/storageProfile.imageReference.publisher",
"equals": "MicrosoftWindowsServer"
}
]
},
{
"field": "Microsoft.Compute/virtualMachines/licenseType",
"notEquals": "Windows_Server"
}
]
},
"then": {
"effect": "audit"
}
},
"parameters": {}
}