Get-AzureRmADUser
Filters active directory users.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
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".
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DisplayName
The display name of the user.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-First
The maximum number of objects to return.
Type: | UInt64 |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The user mail.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ObjectId
Object id of the user.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Skip
Ignores the first N objects and then gets the remaining objects.
Type: | UInt64 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StartsWith
Used to find users that begin with the provided string.
Type: | String |
Aliases: | SearchString |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-UserPrincipalName
UPN of the user.
Type: | String |
Aliases: | UPN |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |