--- title: "Remove-VBRUserRoleAssignment" description: "Removes a role from a user or a user group. If the four-eyes authorization is enabled, you cannot run this cmdlet. For more information, see the Four-Eyes Authorization section in the User Guide for VMware vSphere." canonical: "https://helpcenter.veeam.com/docs/vbr/powershell/remove-vbruserroleassignment.html" breadcrumb: "Veeam PowerShell Reference > Veeam PowerShell Reference > Backup Infrastructure > Roles and Users > Remove-VBRUserRoleAssignment" dateModified: "2026-08-19" --- # Remove-VBRUserRoleAssignment ## Short Description Removes a role from a user or a user group. ::: note If the four-eyes authorization is enabled, you cannot run this cmdlet. For more information, see the [Four-Eyes Authorization](https://helpcenter.veeam.com/docs/vbr/userguide/four_eyes_authorization.html?ver=13) section in the User Guide for VMware vSphere. ::: **Product Edition**: Standard, Enterprise, Enterprise Plus, Veeam Universal License ## Syntax ``` Remove-VBRUserRoleAssignment -Assignment [] ``` ## Detailed Description This cmdlet removes a role from a user or a user group. ::: note You cannot remove the role of the last administrator. This is to prevent a situation where no administrator remains. ::: ## Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Assignment

Specifies a role assignment that you want to remove

Accepts the VBRUserRoleAssignment object. To get this object, run the Get-VBRUserRoleAssignment cmdlet.

VBRUserRoleAssignment

True

Named

True (ByPropertyName, ByValue)

`` This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see [ Microsoft Docs](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_commonparameters?view=powershell-7). ## Examples ::: example ### Example 1. Removing All Role Assignments from User This example shows how to remove all roles that are assigned to the `User\Administrator` user if it has more than one role assigned. ``` Get-VBRUserRoleAssignment -Name "User\Administrator" | Remove-VBRUserRoleAssignment ``` ::: ::: example ### Example 2. Removing Custom Role from User This example shows how to remove a custom role that is assigned to the `User\Administrator` user. ``` $role = Get-VBRUserRoleAssignment -Name "User\Administrator" -RoleEntity (Get-VBRRoleEntity -Name "r1") Remove-VBRUserRoleAssignment -Assignment $role ``` Perform the following steps: 1. Run the [`Get-VBRUserRoleAssignment`](get-vbruserroleassignment.md) cmdlet. Specify the `Name` and `RoleEntity` parameter values. Save the result to the `$role` variable. 2. Run the `Remove-VBRUserRoleAssignment` cmdlet. Set the `$role` variable as the `Assignment` parameter value. ::: ::: example ### Example 3. Removing Built-In Role from User This example shows how to remove a built-in role that is assigned to the `User\Administrator` user. ``` $role = Get-VBRUserRoleAssignment -Name "User\Administrator" -Role BackupOperator Remove-VBRUserRoleAssignment -Assignment $role ``` Perform the following steps: 1. Run the [`Get-VBRUserRoleAssignment`](get-vbruserroleassignment.md) cmdlet. Specify the `Name` and `Role` parameter values. Save the result to the `$role` variable. 2. Run the `Remove-VBRUserRoleAssignment` cmdlet. Set the `$role` variable as the `Assignment` parameter value. ::: ## Related Commands [`Get-VBRUserRoleAssignment`](get-vbruserroleassignment.md)