Get-SCUserRoleMembership

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

Syntax

Get-SCUserRoleMembership
   [-VMMServer <ServerConnection>]
   [[-UserName] <String>]
   [-Resource <ClientObject>]
   [-ForSharing]
   [<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
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Resource

Specifies a resource object.

Type:ClientObject
Position:Named
Default value:None
Required:False
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
Position:0
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VMMServer

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

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

Outputs

UserRoleMembership

This cmdlet returns a UserRoleMembership object.