Get-SCUserRole

Gets a VMM user role. 

Description

The Get-SCUserRole cmdlet gets one or more System Center Virtual Machine Manager (VMM) user roles. VMM uses role-based security to define the boundaries within which members of a given user role can operate and the set of allowed operations members of a user role can perform.

For information about creating user roles, type: "Get-Help New-SCUserRole -detailed".

For information about setting the properties of a user role, including the scope for delegated and read-only administrators and the scope and actions for self-service users, type: "Get-Help Set-SCUserRole -detailed".

For more information about Get-SCUserRole, type: "Get-Help Get-SCUserRole -online".

Parameters

Name

Required? false
Accept Pipeline Input? false
Position? 0
Specifies the name of a VMM object.

UserRoleProfile

Required? false
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.

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.

Examples

1: Get all VMM user roles.
PS C:\> Get-SCUserRole -VMMServer "VMMServer01.Contoso.com"
This command gets all VMM user role objects on VMMServer01 and displays information about each user role.
2: Get a specific user role by name.
PS C:\> Get-SCUserRole -Name "Administrator"
This command gets the user role object named Administrator, and then displays information about that user role to the user.
3: Get a specific user role by UserRoleProfile.
PS C:\> Get-SCUserRole -VMMServer "VMMServer01.Contoso.com" -UserRoleProfile "SelfServiceUser"
This command gets the user role objects on VMMServer01 that have a UserRoleProfile value of "SelfServiceUser", and then displays information about these users role to the user.
4. Display properties and other information about user role objects.
PS C:\> $UserRoles = Get-SCUserRole -VMMServer "VMMServer01.Contoso.com"
PS C:\> $UserRoles | select Name, UserRoleProfile, ParentUserRole, Cloud
PS C:\> $UserRoles | Get-Member
The first command gets all user role objects on VMMServer01 and stores the objects in the $UserRoles variable.

The second command passes each user role object in $UserRoles to "select" (the alias for the Select-Object cmdlet) and then displays the name, user role profile, parent user role, and cloud  for each user role

The last command passes each user role in $UserRoles to the Get-Member cmdlet, which displays the .NET type for each user role and the methods and properties associated with each user role type.

See Also