Skip to main content
SnapCenter 4.7 cmdlets

Add-SmPermissionToRole

Contributors

Adds one or more permissions to a specified role.

Syntax

Add-SmPermissionToRole [-RoleName]  <String>  [-Permissions]  <String>

Detailed Description

Adds one or more permissions to a specified role. Use the format <SnapCenter Role Name>:<Permission Name> where the SnapCenter role 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.The following permissions have the Enabled attribute code: Install/Uninstall, Restore, Dashboard, Reports, and Discovery.For example, if you want to give Host create permissions, you would enter: Add-SmPermissionToRole -Permission Host:Create

Parameters

Name Description Required? Pipeline Input Default Value

RoleName

Specifies the name of the role to which you want to add permissions.

true

true (ByPropertyName)

Permissions

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

true

true (ByPropertyName)

Examples

Example 1: Adding host read, update, and delete permissions to a role

 Add-SmPermissionToRole -RoleName Admin -Permissions ("Host:read","Host:update","Host:delete")

This example syntax adds host read, update and delete permissions to the Admin role.

Example 2: Adding host create permissions to a role

 Add-SmPermissionToRole -RoleName SnapCenterAdmin -Permissions Host:create

This example syntax adds host create permissions to the SnapCenterAdmin role.

SnapCenterAdmin
Host

Example 3: Adding dataset create permissions to a role

 Add-SmPermissionToRole -RoleName SnapCenterAdmin -Permissions DataSet:create

This example syntax adds dataset create permission to the SnapCenterAdmin role.

SnapCenterAdmin
DataSet