Skip to content

Commit 1e99530

Browse files
authored
Merge pull request MicrosoftDocs#1704 from tseward/patch-551
Update Get-SPUser.md
2 parents 5712ffc + c716844 commit 1e99530

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

sharepoint/sharepoint-ps/sharepoint-server/Get-SPUser.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Returns the user account or accounts that match a given search criteria.
1313

1414

1515

16-
## SYNTAX
16+
## SYNTAX
1717

1818
```
1919
Get-SPUser [[-Identity] <SPUserPipeBind>] -Web <SPWebPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
@@ -24,25 +24,39 @@ Get-SPUser [[-Identity] <SPUserPipeBind>] -Web <SPWebPipeBind> [-AssignmentColle
2424
The Get-SPUser cmdlet returns all SharePoint user accounts that match the scope given by the Identity, Web, or Group parameters.
2525

2626
The Identity parameter can use the alias of a user for returning exact matches.
27-
However, a scope must be provided if the Get-SPUser cmdlet is to work.
2827

2928
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online documentation at http://go.microsoft.com/fwlink/p/?LinkId=251831 (http://go.microsoft.com/fwlink/p/?LinkId=251831).
3029

3130
## EXAMPLES
3231

33-
### ------------------EXAMPLE------------------
32+
### ------------------EXAMPLE 1------------------
3433
```
35-
C:\PS>Get-SPUser -Web "http://zsharepoint2" -Group "Viewers"
34+
PS C:\>Get-SPUser -Web 'https://sharepoint.contoso.com' -Group 'Viewers'
3635
```
3736

38-
This example returns all members of the group Viewers on the Web site http://zsharepoint2.
37+
This example returns all members of the SharePoint group Viewers on the site https://sharepoint.contoso.com.
38+
39+
40+
### ------------------EXAMPLE 2------------------
41+
```
42+
PS C:\>Get-SPUser -Identity 'i:0#.w|contoso\jdoe' -Web 'https://sharepoint.contoso.com'
43+
```
44+
45+
This example returns the specific user identified via Windows Claims on the site https://sharepoint.contoso.com.
46+
47+
### ------------------EXAMPLE 3------------------
48+
```
49+
PS C:\>Get-SPUser -Identity 'contoso\jdoe' -Web 'https://sharepoint.contoso.com'
50+
```
51+
52+
This example returns the specific user identified via Classic Windows authentication on the site https://sharepoint.contoso.com.
3953

4054
## PARAMETERS
4155

4256
### -Identity
43-
Specifies the GUID or login name of the user to be returned.
57+
Specifies the ID or login name of the user to be returned.
4458

45-
The type must be a valid URL, in the form http://server_name, or GUID, in the form1234-5678-9807.
59+
The type must be a valid ID or login name, such as the format of 'CONTOSO\jdoe' for Classic Windows Authentication or 'i:0#.w|CONTOSO\jdoe' for Windows Claims.
4660

4761
```yaml
4862
Type: SPUserPipeBind

0 commit comments

Comments
 (0)