Get-Role
Returns one or more Sitecore roles using the specified criteria.
Syntax
Get-Role [-Identity] <AccountIdentity>
Get-Role -Filter <String>
Detailed Description
The Get-Role command returns one or more Sitecore roles using the specified criteria.
The Identity parameter specifies the Sitecore role to get. You can specify a role by its local name or fully qualified name. You can also specify role object variable, such as $<role>.
To search for and retrieve more than one role, use the Filter parameter.
© 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.
Aliases | |
---|---|
Required? | true |
Position? | 1 |
Default Value | |
Accept Pipeline Input? | true (ByValue) |
Accept Wildcard Characters? | false |
-Filter <String>
Specifies a simple pattern to match Sitecore roles.
Examples: The following examples show how to use the filter syntax.
To get all the roles, use the asterisk wildcard: Get-Role -Filter *
To get all the roles in a domain use the following command: Get-Role -Filter "sitecore*"
Aliases | |
---|---|
Required? | true |
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.Role
Returns one or more roles.
Notes
Help Author: Adam Najmanowicz, Michael West
Examples
EXAMPLE 1
EXAMPLE 2
EXAMPLE 3
EXAMPLE 4
Expand the MemberOf property to see a list of roles that the specified role is a member.
Related Topics
Last updated