Get-SCUserRoleMembership
Get-SCUserRoleMembership
Gets information about the user roles of which the current user or a specified user is a member.
Syntax
Parameter Set: Default
Get-SCUserRoleMembership [[-UserName] <String> ] [-ForSharing] [-Resource <ClientObject> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Detailed Description
The Get-SCUserRoleMembership cmdlet gets information about the user roles of which the current user or a specified user is a member.
Parameters
-ForSharing
Indicates that this cmdlet returns information about self-service user roles to which the user belongs that can share resources.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Resource<ClientObject>
Specifies a resource object.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-UserName<String>
Specifies a the name of a user. Enter a user name with the format Domain\User.
Aliases |
none |
Required? |
false |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-VMMServer<ServerConnection>
Specifies a VMM server object.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
- UserRoleMembership
Examples
Example Example 1: Get information about the user roles for the current user is a member of.for
This command returns the Name, Description, and UserRoleProfile for each user role the current user is a member of.
PS C:\> Get-SCUserRoleMembership