Get-RoleMember
Returns the Sitecore users in the specified role.

Syntax

Get-RoleMember [-Identity] <AccountIdentity> [-Recurse]
Get-RoleMember [-Identity] <AccountIdentity> [-UsersOnly] [-Recurse]
Get-RoleMember [-Identity] <AccountIdentity> [-RolesOnly] [-Recurse]

Detailed Description

The Get-RoleMember command returns the Sitecore users in the specified role.
The Identity parameter specifies the Sitecore role to get. You can specify a role by its local name or fully qualified name.
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions

Parameters

-Identity <AccountIdentity>

Specifies the Sitecore role by providing one of the following values.
1
Local Name
2
Example: developer
3
Fully Qualified Name
4
Example: sitecore\developer
Copied!
Aliases
Text
Required?
true
Position?
1
Default Value
Accept Pipeline Input?
true (ByValue)
Accept Wildcard Characters?
false

-Recurse <SwitchParameter>

Aliases
Text
Required?
false
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-UsersOnly <SwitchParameter>

Aliases
Text
Required?
false
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-RolesOnly <SwitchParameter>

Aliases
Text
Required?
false
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.
  • System.String
    Represents the identity of a role.

Outputs

The output type is the type of the objects that the cmdlet emits.
  • Sitecore.Security.Accounts.User
    Returns one or more users.
Sitecore.Security.Accounts.Role Returns one or more roles.

Notes

Help Author: Adam Najmanowicz, Michael West

Examples

EXAMPLE 1

1
PS master:\> Get-RoleMember -Identity developer
2
3
Name Domain IsAdministrator IsAuthenticated
4
---- ------ --------------- ---------------
5
sitecore\michael sitecore False False
Copied!

EXAMPLE 2

1
PS master:\> Get-RoleMember -Identity author
2
3
Name Domain IsAdministrator IsAuthenticated
4
---- ------ --------------- ---------------
5
sitecore\michael sitecore False False
6
7
Domain : sitecore
8
IsEveryone : False
9
IsGlobal : False
10
AccountType : Role
11
Description : Role
12
DisplayName : sitecore\Developer
13
LocalName : sitecore\Developer
14
Name : sitecore\Developer
Copied!

Related Topics

Last modified 10d ago