Skip to content

Commit b59590c

Browse files
authored
Merge pull request MicrosoftDocs#3596 from get-itips/patch-52
Corrected example 2
2 parents f739848 + acddf4f commit b59590c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

exchange/exchange-ps/exchange/role-based-access-control/Remove-ManagementRoleEntry.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ This example removes the New-Mailbox role entry from the Tier 1 Help Desk role.
4343

4444
### -------------------------- Example 2 --------------------------
4545
```
46-
Get-ManagementRoleEntry "Tier 1 Help Desk\New-*" | Remove-ManagementRoleEntry -WhatIf
46+
Get-ManagementRoleEntry "Tier 1 Help Desk\*" | Where-Object {$_.Name -like 'New-*'} | %{Remove-ManagementRoleEntry -Identity "$($_.id)\$($_.name)"}
4747
```
4848

49-
This example removes all the role entries that have the verb New on the Tier 1 Help Desk role by piping the output of the Get-ManagementRoleEntry cmdlet to the Remove-ManagementRoleEntry cmdlet. Because the WhatIf switch has been specified along with the Remove-ManagementRoleEntry cmdlet, the cmdlet lists what changes would have been made but doesn't commit any changes.
49+
This example removes all the role entries that have the verb New on the Tier 1 Help Desk role by piping the output of the Get-ManagementRoleEntry cmdlet to the Where-Object cmdlet which specifies the verb filter and then, these results are being piped to Remove-ManagementRoleEntry cmdlet.
5050

51-
After you verify that the correct role entries will be removed, run the same command without the WhatIf switch to remove the role entries.
51+
This example forces you to acknowledge the command before proceeding.
5252

5353
## PARAMETERS
5454

0 commit comments

Comments
 (0)