Forum Discussion
AustinSundar
Mar 02, 2023Copper Contributor
Creating a Custom RBAC Role for exchange
New-ManagementRole -Parent "View-Only Organization Management" -Name "Custom - ViewOnly Recipients"
Get-ManagementRoleEntry "Custom - ViewOnly Recipients\*" | Where {$_.Name -notlike "*Get-"} | Rem...
- Mar 03, 2023"View-Only Organization Management" is not a built-in role. There's a built-in role group with the same name, but you cannot use a role group for the above process. Try with the "View-Only Recipients" role instead.
VasilMichev
Mar 03, 2023MVP
"View-Only Organization Management" is not a built-in role. There's a built-in role group with the same name, but you cannot use a role group for the above process. Try with the "View-Only Recipients" role instead.
AustinSundar
Mar 08, 2023Copper Contributor
i am trying to restrict the role to use only get-commands. and remving any set commands
Get-ManagementRoleEntry "XXX - ViewOnly Recipients\*" | Where {$_.Name -notlike "*Get"} | Remove-ManagementRoleEntry
however, i receive the error below...
could you help?
Write-ErrorMessage : Cannot process argument transformation on parameter 'Identity'. Cannot convert value "XXX- ViewOnly Recipients" to type "Microsoft.Exchange.Configuration.Tasks.RoleEntryIdParameter". Error: "The format of the value you specified in
the Microsoft.Exchange.Configuration.Tasks.RoleEntryIdParameter parameter isn't valid. Check the value, and then try again.
Parameter name: identity"
Get-ManagementRoleEntry "XXX - ViewOnly Recipients\*" | Where {$_.Name -notlike "*Get"} | Remove-ManagementRoleEntry
however, i receive the error below...
could you help?
Write-ErrorMessage : Cannot process argument transformation on parameter 'Identity'. Cannot convert value "XXX- ViewOnly Recipients" to type "Microsoft.Exchange.Configuration.Tasks.RoleEntryIdParameter". Error: "The format of the value you specified in
the Microsoft.Exchange.Configuration.Tasks.RoleEntryIdParameter parameter isn't valid. Check the value, and then try again.
Parameter name: identity"