Uređivanje

Dijeli putem


Get-AzADUser

Filters active directory users.

Syntax

EmptyParameterSet (Default)

Get-AzADUser
    [-UserPrincipalName <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-IncludeTotalCount]
    [-Skip <UInt64>]
    [-First <UInt64>]
    [<CommonParameters>]

SearchStringParameterSet

Get-AzADUser
    -StartsWith <String>
    [-DefaultProfile <IAzureContextContainer>]
    [-IncludeTotalCount]
    [-Skip <UInt64>]
    [-First <UInt64>]
    [<CommonParameters>]

DisplayNameParameterSet

Get-AzADUser
    -DisplayName <String>
    [-DefaultProfile <IAzureContextContainer>]
    [-IncludeTotalCount]
    [-Skip <UInt64>]
    [-First <UInt64>]
    [<CommonParameters>]

ObjectIdParameterSet

Get-AzADUser
    -ObjectId <Guid>
    [-DefaultProfile <IAzureContextContainer>]
    [-IncludeTotalCount]
    [-Skip <UInt64>]
    [-First <UInt64>]
    [<CommonParameters>]

UPNParameterSet

Get-AzADUser
    -UserPrincipalName <String>
    [-DefaultProfile <IAzureContextContainer>]
    [-IncludeTotalCount]
    [-Skip <UInt64>]
    [-First <UInt64>]
    [<CommonParameters>]

MailParameterSet

Get-AzADUser
    -Mail <String>
    [-DefaultProfile <IAzureContextContainer>]
    [-IncludeTotalCount]
    [-Skip <UInt64>]
    [-First <UInt64>]
    [<CommonParameters>]

Description

Filters active directory users.

Examples

Example 1 - List all users

PS C:\> Get-AzADUser

Lists all AD users in a tenant.

Example 2 - List all users using paging

PS C:\> Get-AzADUser -First 100

Lists the first 100 AD users in a tenant.

Example 3 - Get AD user by user principal name

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

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

Example 4 - List by search string

PS C:\> Get-AzADUser -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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisplayName

The display name of the user.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

DisplayNameParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-First

The maximum number of objects to return.

Parameter properties

Type:UInt64
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IncludeTotalCount

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Mail

The user mail.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

MailParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ObjectId

Object id of the user.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ObjectIdParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Skip

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

Parameter properties

Type:UInt64
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-StartsWith

Used to find users that begin with the provided string.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:SearchString

Parameter sets

SearchStringParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-UserPrincipalName

UPN of the user.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:UPN

Parameter sets

EmptyParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

Guid

Outputs

PSADUser