The New-SCUserRole cmdlet creates a user role for a group of System Center Virtual Machine Manager (VMM) users. You can create the following user roles: Delegated Administrator, Read-Only Administrator, and Self-Service User. Only one Administrator role exists; you cannot create another Administrator role or delete the existing one.
If you are a member of a Delegated Administrator user role, you can create a user role. However, the scope of the new user role must be a subset of the scope of its parent user role.
After you create a user role, you can use the Set-SCUserRole cmdlet to rename the user role, to add or remove members, and to add or modify the scope of objects that members of the role can manage. For a self-service user role, you can specify which actions members of a self-service user role can take on their virtual machines, and you can define a quota that limits the number of virtual machines self-service users can create. Although you cannot create or remove the Administrator role or limit its scope, you can use Set-SCUserRole to add or remove members to that role.
For information about setting the properties of a user role, type: "Get-Help Set-SCUserRole -detailed".
For more information about New-SCUserRole, type: "Get-Help New-SCUserRole -online".
Parameters
Name
Required?
true
Accept Pipeline Input?
false
Position?
0
Specifies the name of a VMM object.
UserRoleProfile
Required?
true
Accept Pipeline Input?
false
Position?
named
Specifies the type of profile to use as the basis for the user role. Valid values are: DelegatedAdmin, ReadOnlyAdmin, SelfServiceUser.
Description
Required?
false
Accept Pipeline Input?
false
Position?
named
States a description for the specified object.
JobGroup
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs.
JobVariable
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies that job progress is tracked and stored in the variable named by this parameter.
ParentUserRole
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies an existing VMM user role as the parent of a new user role.
PROTipID
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.
RunAsynchronously
Required?
false
Accept Pipeline Input?
false
Position?
named
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
VMMServer
Required?
false
Accept Pipeline Input?
true (ByValue)
Position?
named
Specifies a VMM server object.
Examples
1: Create a delegated administrator
user role.
PS C:\> New-SCUserRole -Name "ContosoDelegatedAdmin" -Description "Delegated Administrators for the Contoso.com domain" -UserRoleProfile "DelegatedAdmin"
This command creates a delegated administrator user role named "ContosoDelegatedAdmin", provides the description "Delegated Administrators for the Contoso.com domain", and uses the -UserRoleProfile parameter to designate the user role type as delegated administrator.
2: Create a Self Service User user
role whose members can manage objects in the Lab host
group.
The this command creates a new user role named "ContosoSelfServiceUsers", uses the -UserRoleProfile parameter to designate the new user role type as Self Service User, and stores the new user role object in the $SelfServiceRole variable.