external help file | Module Name | ms.assetid | ms.custom | ms.reviewer | online version | schema |
---|---|---|---|---|---|---|
Microsoft.Open.AzureAD16.Graph.PowerShell.dll-Help.xml |
AzureADPreview |
52681E27-7FE6-43CE-B2BF-8516C21E04CB |
iamfeature=PowerShell |
rodejo |
2.0.0 |
Gets a user.
Get-AzureADUser [-All <Boolean>] [-Top <Int32>] [-Filter <String>] [<CommonParameters>]
Get-AzureADUser [-SearchString <String>] [-All <Boolean>] [<CommonParameters>]
Get-AzureADUser -ObjectId <String> [-All <Boolean>] [<CommonParameters>]
The Get-AzureADUser cmdlet gets a user from Azure Active Directory (AD).
PS C:\>Get-AzureADUser -Top 10
This command gets ten users.
PS C:\>Get-AzureADUser -ObjectId "testUpn@tenant.com"
This command gets the specified user.
PS C:\> Get-AzureADUser -SearchString "New"
ObjectId DisplayName UserPrincipalName UserType
-------- ----------- ----------------- --------
5e8b0f4d-2cd4-4e17-9467-b0f6a5c0c4d0 New user NewUser@contoso.onmicrosoft.com Member
2b450b8e-1db6-42cb-a545-1b05eb8a358b New user NewTestUser@contoso.onmicrosoft.com Member
This cmdlet gets all users that match the value of SearchString against the first characters in DisplayName or UserPrincipalName .
PS C:\>Get-AzureADUser -Filter "userPrincipalName eq 'jondoe@contoso.com'"
This command gets the specified user.
PS C:\>Get-AzureADUser -Filter "startswith(Title,'Sales')"
This command gets all the users whos title starts with sales. ie Sales Manager and Sales Assistant.
If true, return all users. If false, return the number of objects specified by the Top parameter
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
Specifies an oData v3.0 filter statement. This parameter controls which objects are returned. Details on querying with oData can be found here. http://www.odata.org/documentation/odata-version-3-0/odata-version-3-0-core-protocol/#queryingcollections
Type: String
Parameter Sets: GetQuery
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
Specifies the ID (as a UPN or ObjectId) of a user in Azure AD.
Type: String
Parameter Sets: GetById
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
Specifies a search string.
Type: String
Parameter Sets: GetVague
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
Specifies the maximum number of records to return.
Type: Int32
Parameter Sets: GetQuery
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.