Get-SCUserRoleMembership
Gets information about user roles of which a user is a member.
Syntax
Default (Default)
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.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-Resource
Specifies a resource object.
Parameter properties
| Type: | ClientObject |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-UserName
Specifies the name of a user for which this cmdlet gets user roles. Enter a user name in the format Domain\User.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | 0 |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-VMMServer
Specifies a VMM server on which this cmdlet gets user roles.
Parameter properties
| Type: | ServerConnection |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | True |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Outputs
UserRoleMembership
This cmdlet returns a UserRoleMembership object.