Peter Casey One way to check if the inventory has been enabled for the azure virtual machine is to check if Change Tracking extension has been enabled or not. For instance, you can if change tracking is enabled for linux virtual machines, by using field property as "Microsoft.Compute/virtualMachines/extensions/type" and value as "ChangeTracking-Linux". For further references related to change tracking you can refer existing initiative [Preview]: Enable ChangeTracking and Inventory for virtual machines
Can i create an Azure Policy definition that checks which Virtual Machines have Inventory enabled
Peter Casey
20
Reputation points
Hello,
I am looking to create an Azure Policy Definition that will check which Virtual Machines have Inventory enabled.
Is this possible??
In the definition JSON, i have attempted the below...
But cannot find what I should enter in place of the question marks. I believe it should be something that references a Virtual Machines Inventory enablement.
I'm really stuck on this one and would totally appreciate if anyone could advise what i need to enter here.
"allOf": [
{
"field": "type",
"equals": "Microsoft.Compute/virtualMachines"
},
{
"field": "Microsoft.Compute/virtualMachines/????",
"notEquals": "true"
}
]