Skip to main content
SnapCenter 6.0 cmdlets

New-SmRole

Contributors

Enables you to create a role, assign users, assign groups, and assign permissions.

Syntax

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

Detailed Description

Enables you to create a role, assign users, assign groups, and assign permissions.

Parameters

Name Description Required? Pipeline Input Default Value

Name

Specifies the name of the new role.

true

true (ByPropertyName)

Description

Specifies an optional description of the role.

false

true (ByPropertyName)

Permissions

Specifies what permissions are assigned to the role.

false

true (ByPropertyName)

AssignedUsers

Specifies users assigned to the role.

false

true (ByPropertyName)

AssignedGroups

Specifies groups assigned to the role.

false

true (ByPropertyName)

SharedObjects

false

true (ByPropertyName)

Examples

Example 1: Creating a new role

 New-SmRole -Name TestRole

This example syntax creates a new role with the specified name.

Description :
Name: TestRole
Type:
Id  :
Host:
UserName:
Passphrase  :
Deleted : False
Auth: SMCoreContracts.SmAuth
IsClone : False
CloneLevel  : 0

Example 2: Creating a new role and assigning a user

 New-SmRole -Name TestRoleWithUser -AssignedUsers sddev\snapdrive

This example syntax creates a new role and assigns the specified user.

Description :
Name: TestRoleWithUser
Type:
Id  :
Host:
UserName:
Passphrase  :
Deleted : False
Auth: SMCoreContracts.SmAuth
IsClone : False
CloneLevel  : 0

Example 3: Creating a new role and assigning multiple users

 New-SmRole -Name TestRoleWithUsers -AssignedUsers "sddev\administrator,sddev\snapdrive"

This example syntax creates a new role and assigns multiple users to the role.

Description :
Name: TestRoleWithUsers
Type:
Id  :
Host:
UserName:
Passphrase  :
Deleted : False
Auth: SMCoreContracts.SmAuth
IsClone : False
CloneLevel  : 0

Example 4: Creating a new role and assigning a group

 New-SmRole -Name TestRoleWithGroup -AssignedGroups sddev\administrators

This example syntax creates a new role and assigns the specified group to the role.

Description :
Name: TestRoleWithGroup
Type:
Id  :
Host:
UserName:
Passphrase  :
Deleted : False
Auth: SMCoreContracts.SmAuth
IsClone : False
CloneLevel  : 0

Example 5: Creating a role and assigning multiple groups

 New-SmRole -Name TestRoleWithGroups -AssignedGroups "sddev\administrators, sddev\Domain Admins"

This example syntax creates a new role and assigns multiple groups to the role.

Description :
Name: TestRoleWithGroups
Type:
Id  :
Host:
UserName:
Passphrase  :
Deleted : False
Auth: SMCoreContracts.SmAuth
IsClone : False
CloneLevel  : 0

Example 6: Creating a new role and assigning permissions

 New-SmRole -Name TestRoleWithGroups -AssignedGroups "sddev\administrators, sddev\Domain Admins"

This example syntax creates a new role and assigns the specified permissions the groups assigned to the role.

PS C:\> New-SmRole -Name TestRoleWithPermissions -Permissions "Host: read, update, delete, crea
te;dataset: read, update, create, delete;manageusergroup: allow;Plugin_Installation: read, update"
Description :
Name: TestRoleWithPermissions
Type:
Id  :
Host:
UserName:
Passphrase  :
Deleted : False
Auth: SMCoreContracts.SmAuth
IsClone : False
CloneLevel  : 0