Skip to main content
SnapCenter 6.0 cmdlets

Remove-SmPermissionFromRole

Contributors

Removes one or more permissions from a specified role.

Syntax

Remove-SmPermissionFromRole [-RoleName]  <String>  [-Permissions]  <String>

Detailed Description

Removes one or more permissions from a specified role. Use the format <SnapCenter Resource Name>:<Permission Name> where the SnapCenter Resource name is Dataset, Policy, Backup, Host, Storage Connection, Clone, Provision, Dashboard, Restore, Reports, Discovery, Plugin Install/Uninstall, Migration, Mount, and Unmount, and the permission name is create, read, update, delete and allow.

Parameters

Name Description Required? Pipeline Input Default Value

RoleName

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

true

true (ByPropertyName)

Permissions

Specifies one or more permissions you want to remove from a role. Use the format <SnapCenter Role Name>:<Permission Name>. Permission include: create, read, update, delete and allow.

true

true (ByPropertyName)

Examples

Example 1: Removing a specific permission from a role

 Remove-SmPermissionFromRole -RoleName "Infrastructure Admin" -Permissions DataSet:create

This example syntax removes the specified permission from a role.

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

Example 2: Removing a specific permission from a role without a confirm dialogue

 Remove-SmPermissionFromRole -RoleName "Infrastructure Admin" -Permissions DataSet:create -Confirm:$false

This example syntax removes the specified permission from a role.

Example 3: Removing multiple permissions from a role

 Remove-SmPermissionFromRole -RoleName "Infrastructure Admin" -Permissions("Host:read","Host:update","Host:delete")

This example syntax removes multiple permissions from a role.