TestimoX

API Reference

Command

Get-ADXUser

Namespace ADPlayground.PowerShell
Outputs
ADPlayground.DirectoryObjectSnapshot ADPlayground.DirectoryUserGroupsSnapshot ADPlayground.UserRecord ADPlayground.Users.UserReportingRow

Retrieves Active Directory users in list mode or a single user by identity.

Examples

Authored help example

Example 1: Default identity mode with a single expected match


Get-ADXUser -Identity 'alice' -Domain 'contoso.com'
        

Example 2: Return all matches across queried domains


Get-ADXUser -Identity 'alice' -Domain 'contoso.com','fabrikam.com' -AllMatches
        

Example 3: Return all matches across forest domains


Get-ADXUser -Identity 'alice' -AllMatches
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Get-ADXUser -Identity <string> [-AllMatches] [-Domain <string[]>] [-GroupRecursionDepth <int>] [-IncludeGroups] [-IncludeTrustedDomains] [-Property <string[]>] [-RecursiveGroups] [-Scope <CurrentDomain|Forest|TrustedForests|ExplicitDomains>] [<CommonParameters>]
#
Parameter set: By Identity

Parameters

Identity string requiredposition: 0pipeline: falsealiases: CommonName, DistinguishedName, DN, Mail, Name, SamAccountName, UPN, UserPrincipalName
Gets or sets user identity (sAMAccountName, UPN, DN, mail, or name) for single-object mode.
AllMatches SwitchParameter optionalposition: namedpipeline: false
Gets or sets whether identity mode should return all matches across queried domains. By default (switch not set), identity mode expects a single match and throws on ambiguity.
Domain string[] optionalposition: namedpipeline: falsealiases: DomainName
Gets or sets domain DNS names. In list mode defaults to current domain.
GroupRecursionDepth int optionalposition: namedpipeline: false
Gets or sets the maximum recursion depth for recursive group resolution in identity mode.
IncludeGroups SwitchParameter optionalposition: namedpipeline: false
Gets or sets whether to include direct group memberships in identity mode.
IncludeTrustedDomains SwitchParameter optionalposition: namedpipeline: false
Includes trusted domains when using forest-based scopes.
Property string[] optionalposition: namedpipeline: false
Gets or sets optional additional LDAP attributes to return in identity mode.
RecursiveGroups SwitchParameter optionalposition: namedpipeline: false
Gets or sets whether to resolve recursive parent groups in identity mode.
Scope DirectoryScenarioScope optionalposition: namedpipeline: falsevalues: 4
Default scope used when -Domain is not provided. Possible values: CurrentDomain, Forest, TrustedForests, ExplicitDomains
Possible values: CurrentDomain, Forest, TrustedForests, ExplicitDomains

Outputs

ADPlayground.DirectoryObjectSnapshot, ADPlayground.DirectoryUserGroupsSnapshot, ADPlayground.UserRecord, ADPlayground.Users.UserReportingRow

Get-ADXUser [-Domain <string[]>] [-Filter <string[]>] [-First <int>] [-IncludeTrustedDomains] [-MinInactiveDays <int>] [-MinPasswordAgeDays <int>] [-PropertySet <Basic|Full>] [-ResolveTrueLastLogon] [-Scope <CurrentDomain|Forest|TrustedForests|ExplicitDomains>] [-ServiceAccountsOnly] [-Skip <int>] [-TrueLastLogonDop <int>] [-View <Default|Compact|Aging|Security|Risk>] [<CommonParameters>]
#
Parameter set: By Filter + First

Parameters

Domain string[] optionalposition: namedpipeline: falsealiases: DomainName
Gets or sets domain DNS names. In list mode defaults to current domain.
Filter string[] optionalposition: namedpipeline: false
Filter categories in list mode. Multiple values allowed.
First int optionalposition: namedpipeline: false
Limits the number of returned rows after -Skip in list mode.
IncludeTrustedDomains SwitchParameter optionalposition: namedpipeline: false
Includes trusted domains when using forest-based scopes.
MinInactiveDays int optionalposition: namedpipeline: false
Minimum days of inactivity (LastLogon/LastLogonTimestamp) in list mode.
MinPasswordAgeDays int optionalposition: namedpipeline: false
Minimum password age in days (pwdLastSet) in list mode.
PropertySet UserProperties optionalposition: namedpipeline: falsevalues: 2
Property set to retrieve in list mode. Possible values: Basic, Full
Possible values: Basic, Full
ResolveTrueLastLogon SwitchParameter optionalposition: namedpipeline: false
Resolve authoritative lastLogon across all DCs in list mode.
Scope DirectoryScenarioScope optionalposition: namedpipeline: falsevalues: 4
Default scope used when -Domain is not provided. Possible values: CurrentDomain, Forest, TrustedForests, ExplicitDomains
Possible values: CurrentDomain, Forest, TrustedForests, ExplicitDomains
ServiceAccountsOnly SwitchParameter optionalposition: namedpipeline: false
Shortcut to include only service accounts in list mode.
Skip int optionalposition: namedpipeline: false
Skips the specified number of rows after deterministic ordering in list mode.
TrueLastLogonDop int optionalposition: namedpipeline: false
Parallelism for true last logon resolution in list mode (default 4).
View AdxUsersView optionalposition: namedpipeline: falsevalues: 5
Output view for list projection. Possible values: Default, Compact, Aging, Security, Risk
Possible values: Default, Compact, Aging, Security, Risk

Outputs

ADPlayground.DirectoryObjectSnapshot, ADPlayground.DirectoryUserGroupsSnapshot, ADPlayground.UserRecord, ADPlayground.Users.UserReportingRow