Get-AzureRmADUser

Filters active directory users.

Syntax

Get-AzureRmADUser
   [-UserPrincipalName <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureRmADUser
   -SearchString <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureRmADUser
   -ObjectId <Guid>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureRmADUser
   -UserPrincipalName <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureRmADUser
   -Mail <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Filters active directory users.

Examples

-------------------------- Filters users using UPN --------------------------

PS C:\> Get-AzureRmADUser -UPN foo@domain.com

Gets user with foo@domain.com

-------------------------- Filters users using Search String --------------------------

PS C:\> Get-AzureRmADUser -SearchString Joe

Filters all ad users that has Joe in the display name.

-------------------------- List AD users --------------------------

PS C:\> Get-AzureRmADUser

Gets all AD users

Required Parameters

-Mail
Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ObjectId

Object id of the user.

Type:Guid
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-SearchString

The user display name

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UserPrincipalName

UPN of the user.

Type:String
Aliases:UPN
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Outputs

System.Collections.Generic.List`1[Microsoft.Azure.Graph.RBAC.Version1_6.ActiveDirectory.PSADUser]