File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/Resources/Resources/help Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ The **Remove-AzPolicyAssignment** cmdlet removes the specified policy assignment
39
39
### Example 1: Remove policy assignment by name and scope
40
40
``` powershell
41
41
$ResourceGroup = Get-AzResourceGroup -Name 'ResourceGroup11'
42
- Remove-AzPolicyAssignment -Name 'PolicyAssignment07' -Scope $ResourceGroup.ResourceId -Confirm
42
+ Remove-AzPolicyAssignment -Name 'PolicyAssignment07' -Scope $ResourceGroup.ResourceId -Confirm:$false
43
43
```
44
44
45
45
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.
51
51
``` powershell
52
52
$ResourceGroup = Get-AzResourceGroup -Name 'ResourceGroup11'
53
53
$PolicyAssignment = Get-AzPolicyAssignment -Name 'PolicyAssignment07' -Scope $ResourceGroup.ResourceId
54
- Remove-AzPolicyAssignment -Id $PolicyAssignment.ResourceId -Confirm
54
+ Remove-AzPolicyAssignment -Id $PolicyAssignment.ResourceId -Confirm:$false
55
55
```
56
56
57
57
The first command gets a resource group named ResourceGroup11, and then stores that object in the $ResourceGroup variable.
You can’t perform that action at this time.
0 commit comments