Get-SCUserRoleMembership

Gets information about user roles of which a user is a member.

Syntax

Get-SCUserRoleMembership [[-UserName] <String>] [-ForSharing] [-Resource <ClientObject>]
 [-VMMServer <ServerConnection>] [<CommonParameters>]

Description

The Get-SCUserRoleMembership cmdlet gets information about the user roles of which the current user or a specified user is a member.

Examples

Example 1: Get information about user roles for current user

PS C:\> Get-SCUserRoleMembership

This command returns the name, description, and user role profile for each user role of which the current user is a member.

Parameters

-ForSharing

Indicates that this cmdlet gets only self-service user roles to which the user belongs that can share resources.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Resource

Specifies a resource object.

Type:ClientObject
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UserName

Specifies the name of a user for which this cmdlet gets user roles. Enter a user name in the format Domain\User.

Type:String
Required:False
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server on which this cmdlet gets user roles.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Outputs

UserRoleMembership

This cmdlet returns a **UserRoleMembership** object.