Skip to content

Commit

Permalink
Update New-AzPolicyExemption.md
Browse files Browse the repository at this point in the history
Updated Exmaple 4: The variable "$SpecialVM.Id" in the "New-AzPolicyExemption" command is not existing. Instead, script is using "$VM" to store the output of "Get-AzVM".
  • Loading branch information
singh1612 authored Feb 21, 2025
1 parent 986d643 commit 664dde1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Resources/Resources/help/New-AzPolicyExemption.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The final command exempts the policy assignment in $Assignment at the level of t
```powershell
$VM = Get-AzVM -Name 'SpecialVM'
$Assignment = Get-AzPolicyAssignment -Name 'VirtualMachinePolicyAssignment'
New-AzPolicyExemption -Name 'VirtualMachinePolicyAssignment' -PolicyAssignment $Assignment -Scope $SpecialVM.Id -ExemptionCategory Waiver
New-AzPolicyExemption -Name 'VirtualMachinePolicyAssignment' -PolicyAssignment $Assignment -Scope $VM.Id -ExemptionCategory Waiver
```

The first command gets a VM named SpecialVM by using the Get-AzVM cmdlet and stores it in the $VM variable.
Expand Down

0 comments on commit 664dde1

Please sign in to comment.