Skip to content

Commit 1cb44d2

Browse files
committed
Fixed clean up resources
1 parent 90a1c8f commit 1cb44d2

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

articles/role-based-access-control/quickstart-role-assignments-template.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,19 @@ To remove the role assignment and resource group you created, follow these steps
117117
1. Copy and paste the following script into Cloud Shell.
118118
119119
```azurepowershell
120-
$resourceGroupName = Read-Host -Prompt "Enter a resource group name (i.e. ExampleGrouprg)"
121-
$emailAddress = Read-Host -Prompt "Enter an email address for a user in your directory"
120+
$emailAddress = Read-Host -Prompt "Enter the email address of the user with the role assignment to remove"
121+
$resourceGroupName = Read-Host -Prompt "Enter the resource group name to remove (i.e. ExampleGrouprg)"
122122
123123
$principalId = (Get-AzAdUser -Mail $emailAddress).id
124124
Remove-AzRoleAssignment -ObjectId $principalId -RoleDefinitionName "Virtual Machine Contributor" -ResourceGroupName $resourceGroupName
125-
126125
Remove-AzResourceGroup -Name $resourceGroupName
127126
```
128127
129-
1. Enter the resource group name.
128+
1. Enter the email address of the user with the role assignment to remove.
129+
130+
1. Enter the resource group name to remove such as ExampleGrouprg.
131+
132+
1. If necessary, press Enter to run the Remove-AzResourceGroup command.
130133
131134
1. Enter **Y** to confirm that you want to remove the resource group.
132135

0 commit comments

Comments
 (0)