Skip to content

Commit cd89843

Browse files
authored
Update New-AzPolicyExemption.md (#27199)
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".
1 parent 986d643 commit cd89843

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Resources/Resources/help/New-AzPolicyExemption.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ The final command exempts the policy assignment in $Assignment at the level of t
6262
```powershell
6363
$VM = Get-AzVM -Name 'SpecialVM'
6464
$Assignment = Get-AzPolicyAssignment -Name 'VirtualMachinePolicyAssignment'
65-
New-AzPolicyExemption -Name 'VirtualMachinePolicyAssignment' -PolicyAssignment $Assignment -Scope $SpecialVM.Id -ExemptionCategory Waiver
65+
New-AzPolicyExemption -Name 'VirtualMachinePolicyAssignment' -PolicyAssignment $Assignment -Scope $VM.Id -ExemptionCategory Waiver
6666
```
6767

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

0 commit comments

Comments
 (0)