Get-VBRUserRoleAssignment
Prev1/2Next
Short Description
Returns a role that is assigned to a user or a user group.
Applies to
Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
This cmdlet provides parameter sets that allow you to:
- Get role assignments filtered by role entities.
Get-VBRUserRoleAssignment [-Name <String[]>] [-RoleEntity <VBRRoleEntity[]>] [-Type <VBRRoleType[]>] [<CommonParameters>] |
- Get role assignments filtered by role values.
Get-VBRUserRoleAssignment [-Name <String[]>] [-Role <VBRRole[]>] [-Type <VBRRoleType[]>] [<CommonParameters>] |
Detailed Description
This cmdlet returns a role that is assigned to a user or a user group.
Parameters
Parameter |
Description |
Type |
Required |
Position |
Accept Pipeline Input |
|---|---|---|---|---|---|
Name |
Specifies an array of names of users or user groups. The cmdlet will get roles that are assigned to these users or user groups. Note: You must specify the name of a user or a user group in the DOMAIN\Username format. |
String[] |
False |
Named |
True (ByValue, |
RoleEntity |
Specifies a role that you want to get. The cmdlet will return the roles assigned to the user or a user group.. |
Accepts the VBRRoleEntity object. To get this object, run the Get-VBRRoleEntity cmdlet. |
False |
Named |
False |
Role |
Specifies a role that you want to get. You can get one of the following roles:
|
VBRRole[] |
False |
Named |
False |
Type |
Specifies a type of the user which role you want to get. You can specify one of the following type of a user:
|
VBRRoleType[] |
False |
Named |
False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.
Output Object
The cmdlet returns the VBRUserRoleAssignment object that defines a role for a user or a user group
Examples
Example 1. Getting Role of Specific User
|
This command returns a role that is assigned to the Tech\BackupAdmin user. The cmdlet output will contain the following details RoleEntity, Role, Type, Name and Id. |
Example 2. Getting All Users and User Groups with Specific Role
|
This command returns all users and user groups that have the Backup Operator role. The cmdlet output will contain the following details RoleEntity, Role, Type, Name and Id. |
Example 3. Getting Role Assigned Through a Custom Role Entity
|
This command returns the role that is assigned through the Role_01X custom role entity. The cmdlet output will contain the following details RoleEntity, Role, Type, Name and Id.
|
Related Commands