Skip to content

Commit c55434c

Browse files
committed
Small edits, code indent
1 parent 4968bf1 commit c55434c

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

articles/role-based-access-control/conditions-role-assignments-powershell.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -168,28 +168,28 @@ If you need to make the same update to multiple role assignments, you can use a
168168

169169
- Finds role assignments in a subscription with `<find-condition-string-1>` or `<find-condition-string-2>` strings in the condition.
170170

171-
```azurepowershell
172-
$tenantId = "<your-tenant-id>"
173-
$subscriptionId = "<your-subscription-id>";
174-
$scope = "/subscriptions/$subscriptionId"
175-
$findConditionString1 = "<find-condition-string-1>"
176-
$findConditionString2 = "<find-condition-string-2>"
177-
Connect-AzAccount -TenantId $tenantId -SubscriptionId $subscriptionId
178-
$roleAssignments = Get-AzRoleAssignment -Scope $scope
179-
$foundRoleAssignments = $roleAssignments | Where-Object { ($_.Condition -Match $findConditionString1) -Or ($_.Condition -Match $findConditionString2) }
180-
```
171+
```azurepowershell
172+
$tenantId = "<your-tenant-id>"
173+
$subscriptionId = "<your-subscription-id>";
174+
$scope = "/subscriptions/$subscriptionId"
175+
$findConditionString1 = "<find-condition-string-1>"
176+
$findConditionString2 = "<find-condition-string-2>"
177+
Connect-AzAccount -TenantId $tenantId -SubscriptionId $subscriptionId
178+
$roleAssignments = Get-AzRoleAssignment -Scope $scope
179+
$foundRoleAssignments = $roleAssignments | Where-Object { ($_.Condition -Match $findConditionString1) -Or ($_.Condition -Match $findConditionString2) }
180+
```
181181
182182
The following commands perform the following tasks:
183183
184184
- In the condition of the found role assignments, replaces `<condition-string>` with `<replace-condition-string>`.
185185
- Updates the role assignments with the changes.
186186
187-
```azurepowershell
188-
$conditionString = "<condition-string>"
189-
$conditionStringReplacement = "<condition-string-replacement>"
190-
$updatedRoleAssignments = $foundRoleAssignments | ForEach-Object { $_.Condition = $_.Condition -replace $conditionString, $conditionStringReplacement; $_ }
191-
$updatedRoleAssignments | ForEach-Object { Set-AzRoleAssignment -InputObject $_ -PassThru }
192-
```
187+
```azurepowershell
188+
$conditionString = "<condition-string>"
189+
$conditionStringReplacement = "<condition-string-replacement>"
190+
$updatedRoleAssignments = $foundRoleAssignments | ForEach-Object { $_.Condition = $_.Condition -replace $conditionString, $conditionStringReplacement; $_ }
191+
$updatedRoleAssignments | ForEach-Object { Set-AzRoleAssignment -InputObject $_ -PassThru }
192+
```
193193
194194
If strings include special characters, such as square brackets ([ ]), you'll need to escape these characters with a backslash (\\).
195195

articles/role-based-access-control/delegate-role-assignments-portal.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ If the condition templates don't work for your scenario or if you want more cont
179179

180180
## Edit a condition
181181

182-
There are two ways that you can edit a condition. You can use the condition template or you can use a condition editor.
182+
There are two ways that you can edit a condition. You can use the condition template or you can use the condition editor.
183183

184184
1. In the Azure portal, open **Access control (IAM)** page for the role assignment that has a condition that you want to view, edit, or delete.
185185

@@ -191,7 +191,7 @@ There are two ways that you can edit a condition. You can use the condition temp
191191

192192
:::image type="content" source="./media/shared/condition-role-assignments-list-edit.png" alt-text="Screenshot of role assignment list with View/Edit link for condition." lightbox="./media/shared/condition-role-assignments-list-edit.png":::
193193

194-
The **Add role assignment condition** page appears. This page will look different depending on whether the condition matches an existing condition.
194+
The **Add role assignment condition** page appears. This page will look different depending on whether the condition matches an existing template.
195195

196196
1. If the condition matches an existing template, select **Configure** to edit the condition.
197197

0 commit comments

Comments
 (0)