Skip to main content
SnapCenter 6.0 cmdlets

Set-SmRole

Contributors

Modifies an existing role.

Syntax

Set-SmRole [-Name]  <String>  [-Description]  <String>  [-Permissions]  <String>  [-AssignedUsers]  <String>  [-AssignedGroups]  <String>  [-SharedObjects]  <>  [-DeleteSharedObjects]  <>

Detailed Description

Modifies an existing role. Enables you to modify assigned groups and users to the role, and to modify assigned SnapCenter resource permissions.

Parameters

Name Description Required? Pipeline Input Default Value

Name

Specifies the name of the role you want to modify.

true

true (ByPropertyName)

Description

Describes the role you want to modify.

false

true (ByPropertyName)

Permissions

Specifies the permissions for the role: Example: host:read,create,delete,update;dataset:create,update,dashboard,allowUse the format [<SnapCenter Resource Name>:<permission1 name>,<permission2 name>,…​];[<SnapCenter Resource Name>…​]Permission settings for multiple SnapCenter resource names must be separated by ";"The SnapCenter resource name is DataSet, Policy, Backup, Host, StorageConnection, Clone, Provision, DashBoard, Restore, Reports, Discovery, Plugin_Installation or Migration.The permission name is create, read, update, delete or allow.

false

true (ByPropertyName)

AssignedUsers

Specifies users to be assigned to the role: Example: domain1\user1,domain2\user2

false

true (ByPropertyName)

AssignedGroups

Specifies groups to be assigned to the role: Example: domain1\group1,domain2\group2

false

true (ByPropertyName)

SharedObjects

false

true (ByPropertyName)

DeleteSharedObjects

false

true (ByPropertyName)

Examples

Example 1: Modify a role and assigning permissions, users, and groups

 set-smrole -Name PayrollAppAdmin -Description "Manage payroll backup operations" -Permissions "DashBoard:allow;manageusergroup:allow;Plugin_Installation:read,update;DataSet:create,read,update,delete" -AssignedUsers "sddev\administrator" -AssignedGroups "mva\Administrators"

This example syntax modifies an existing role and assigns the specified permissions, users, and groups to the role.

Description : Manage payroll backup operations
Name: PayrollAppAdmin
Type:
Id  :
Host:
UserName:
Passphrase  :
Deleted : False
Auth: SMCoreContracts.SmAuth
IsClone : False
CloneLevel  : 0