Get-AzureRmADUser

Filters active directory users.

Syntax

Get-AzureRmADUser
   [-UserPrincipalName <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [-IncludeTotalCount]
   [-Skip <UInt64>]
   [-First <UInt64>]
   [<CommonParameters>]
Get-AzureRmADUser
   -StartsWith <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-IncludeTotalCount]
   [-Skip <UInt64>]
   [-First <UInt64>]
   [<CommonParameters>]
Get-AzureRmADUser
   -DisplayName <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-IncludeTotalCount]
   [-Skip <UInt64>]
   [-First <UInt64>]
   [<CommonParameters>]
Get-AzureRmADUser
   -ObjectId <Guid>
   [-DefaultProfile <IAzureContextContainer>]
   [-IncludeTotalCount]
   [-Skip <UInt64>]
   [-First <UInt64>]
   [<CommonParameters>]
Get-AzureRmADUser
   -UserPrincipalName <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-IncludeTotalCount]
   [-Skip <UInt64>]
   [-First <UInt64>]
   [<CommonParameters>]
Get-AzureRmADUser
   -Mail <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-IncludeTotalCount]
   [-Skip <UInt64>]
   [-First <UInt64>]
   [<CommonParameters>]

Description

Filters active directory users.

Examples

Example 1 - List all users

PS C:\> Get-AzureRmADUser

Lists all AD users in a tenant.

Example 2 - List all users using paging

PS C:\> Get-AzureRmADUser -First 100

Lists the first 100 AD users in a tenant.

Example 3 - Get AD user by user principal name

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

Gets the AD user with user principal name "foo@domain.com".

Example 4 - List by search string

PS C:\> Get-AzureRmADUser -SearchString Joe

Lists all AD users whose display name starts with "Joe".

Required Parameters

-DisplayName

The display name of the user.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Mail

The user 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
-StartsWith

Used to find users that begin with the provided string.

Type:String
Aliases:SearchString
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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

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
-First

The maximum number of objects to return.

Type:UInt64
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IncludeTotalCount

Reports the number of objects in the data set. Currently, this parameter does nothing.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Skip

Ignores the first N objects and then gets the remaining objects.

Type:UInt64
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

Inputs

String

Guid

Outputs

Microsoft.Azure.Graph.RBAC.Version1_6.ActiveDirectory.PSADUser