Skip to main content
SnapCenter 4.7 cmdlets

Remove-SmUserFromRole

Contributors

Deletes a user from an RBAC role.

Syntax

Remove-SmUserFromRole [-UserName]  <SmString>  [-RoleName]  <String>  [-Domain]  <String>

Detailed Description

Deletes a user from an RBAC role.

Parameters

Name Description Required? Pipeline Input Default Value

UserName

Specifies the user you want to remove from the RBAC role.

true

true (ByPropertyName)

RoleName

Specifies the name of the role from which you want to remove the user.

true

true (ByPropertyName)

Domain

Domain to which user belongs to. Workgroup users should skip this parameter.

false

true (ByPropertyName)

Examples

Example 1: Deleting a role from a specific user

 Remove-SmUserFromRole  -UserName administrator -Domain mva -RoleName BackupAdmin

This example syntax removes the specified user from a role.

Remove-SmUserFromRole
Are you sure you want to unassign the user from role?.
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y
BackupAdmin
mva\administrator

Example 2: Deleting a role from a specific user without confirmation dialogue

 Remove-SmUserFromRole  -UserName administrator -Domain mva -RoleName BackupAdmin -Confirm:$false

This example syntax removes the specified user from a role.

Remove-SmUserFromRole
BackupAdmin
mva\administrator

===