Skip to content

Commit e28579e

Browse files
authored
Corrected syntax for ConfirmAction (#20902)
`-Confirm` in the examples were not in the correct format to override the confirmation prompt
1 parent 565c798 commit e28579e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Resources/Resources/help/Remove-AzPolicyAssignment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The **Remove-AzPolicyAssignment** cmdlet removes the specified policy assignment
3939
### Example 1: Remove policy assignment by name and scope
4040
```powershell
4141
$ResourceGroup = Get-AzResourceGroup -Name 'ResourceGroup11'
42-
Remove-AzPolicyAssignment -Name 'PolicyAssignment07' -Scope $ResourceGroup.ResourceId -Confirm
42+
Remove-AzPolicyAssignment -Name 'PolicyAssignment07' -Scope $ResourceGroup.ResourceId -Confirm:$false
4343
```
4444

4545
The first command gets a resource group named ResourceGroup11 by using the Get-AzResourceGroup cmdlet.
@@ -51,7 +51,7 @@ The **ResourceId** property of $ResourceGroup identifies the resource group.
5151
```powershell
5252
$ResourceGroup = Get-AzResourceGroup -Name 'ResourceGroup11'
5353
$PolicyAssignment = Get-AzPolicyAssignment -Name 'PolicyAssignment07' -Scope $ResourceGroup.ResourceId
54-
Remove-AzPolicyAssignment -Id $PolicyAssignment.ResourceId -Confirm
54+
Remove-AzPolicyAssignment -Id $PolicyAssignment.ResourceId -Confirm:$false
5555
```
5656

5757
The first command gets a resource group named ResourceGroup11, and then stores that object in the $ResourceGroup variable.

0 commit comments

Comments
 (0)