Get-User
Returns one or more Sitecore users using the specified criteria.
Syntax
Detailed Description
The Get-User command returns a user or performs a search to retrieve multiple users from Sitecore.
The Identity parameter specifies the Sitecore user to get. You can specify a user by its local name or fully qualified name. You can also specify user object variable, such as $<user>.
To search for and retrieve more than one user, use the Filter parameter.
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
Parameters
-Identity <AccountIdentity>
Specifies the Sitecore user by providing one of the following values.
Local Name:
Fully Qualified Name:
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 users.
Examples: The following examples show how to use the filter syntax.
To get all the users, use the asterisk wildcard:
To get all the users in a domain use the following command:
Aliases | |
---|---|
Required? | true |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-Current <SwitchParameter>
Aliases | |
---|---|
Required? | true |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-Authenticated <SwitchParameter>
Aliases | |
---|---|
Required? | false |
Position? | named |
Default Value | |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-ResultPageSize <Int32>
Specifies the number of users to retrieve per request to the user provider. Each page of users is written to the pipeline before the next request is made. Without specifying this parameter all accounts are retrieved before passing down the pipeline.
Aliases | |
---|---|
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 user.
Outputs
The output type is the type of the objects that the cmdlet emits.
Sitecore.Security.Accounts.User
Returns one or more users.
Notes
Help Author: Adam Najmanowicz, Michael West
Examples
EXAMPLE 1
EXAMPLE 2
EXAMPLE 3
EXAMPLE 4
EXAMPLE 5
Expand the MemberOf property to see a list of roles that the specified user is a member.
Related Topics
Last updated