Create Pull Request
| Date | Scan | Status | Result |
|---|---|---|---|
| 2026-01-14 00:00 | #250 | in_progress |
Biased
|
| 2026-01-13 00:00 | #246 | completed |
Biased
|
| 2026-01-11 00:00 | #240 | completed |
Biased
|
| 2026-01-10 00:00 | #237 | completed |
Biased
|
| 2026-01-09 00:34 | #234 | completed |
Biased
|
| 2026-01-08 00:53 | #231 | completed |
Biased
|
| 2026-01-06 18:15 | #225 | cancelled |
Clean
|
| 2025-08-17 00:01 | #83 | cancelled |
Clean
|
| 2025-07-13 21:37 | #48 | completed |
Clean
|
| 2025-07-12 23:44 | #41 | cancelled |
Biased
|
> [!NOTE]
> The definition MUST be assigned with enforcement mode disabled (DoNotEnforce) to prevent failures on newly created resources.
Replace _Subscription01_ with the name of your intended resource group.
The **Scope** parameter on `New-AzPolicyAssignment` works with management group, subscription,
resource group, or a single resource. The parameter uses a full resource path, which the
**ResourceId** property on `Get-AzResourceGroup` returns. The pattern for **Scope** for each
container is as follows. Replace `{rName}`, `{rgName}`, `{subId}`, and `{mgName}` with your
resource name, resource group name, subscription ID, and management group name, respectively.
`{rType}` would be replaced with the **resource type** of the resource, such as
`Microsoft.Compute/virtualMachines` for a VM.
- Resource - `/subscriptions/{subID}/resourceGroups/{rgName}/providers/{rType}/{rName}`
- Resource group - `/subscriptions/{subId}/resourceGroups/{rgName}`
- Subscription - `/subscriptions/{subId}`
- Management group - `/providers/Microsoft.Management/managementGroups/{mgName}`
1. After you create the policy assignment, you can create a remediation task that adds the identity to existing virtual machine and virtual machine scale sets resources by running the following command:
The command creates a policy definition named _Modify identities on existing VMs and VMSS_. When called without location parameters, `New-AzPolicyDefinition` defaults to saving the policy definition in the selected subscription of the session's context. To save the definition to a different location, use the following parameters: - **SubscriptionId** - Save to a different subscription. Requires a _GUID_ value. - **ManagementGroupName** - Save to a management group. Requires a _string_ value. 1. After you create your policy definition, you can create a policy assignment by running the following commands: