June 2020
Intermediate to advanced
432 pages
11h 57m
English
Policies can be assigned at different levels within Azure, either at the resource group level, subscription level, or management group level. This can be done through the portal, ARM templates or blueprints, or PowerShell.
To use PowerShell, the following series of commands can be used:
$rg = Get-AzResourceGroup -Name myResourceGroupName$definition = Get-AzPolicyDefinition | Where-Object { $_.Properties.DisplayName -eq 'Audit VMs that do not use managed disks' }
The policy that is chosen here is a built-in policy that will audit all virtual machines that do not use managed disks but have custom disks in storage accounts. ...
Read now
Unlock full access