API Reference
Command
Get-ADXUser
Retrieves Active Directory users in list mode or a single user by identity.
Examples
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 IdentityParameters
- Identity string
- Gets or sets user identity (sAMAccountName, UPN, DN, mail, or name) for single-object mode.
- AllMatches SwitchParameter
- 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[]
- Gets or sets domain DNS names. In list mode defaults to current domain.
- GroupRecursionDepth int
- Gets or sets the maximum recursion depth for recursive group resolution in identity mode.
- IncludeGroups SwitchParameter
- Gets or sets whether to include direct group memberships in identity mode.
- IncludeTrustedDomains SwitchParameter
- Includes trusted domains when using forest-based scopes.
- Property string[]
- Gets or sets optional additional LDAP attributes to return in identity mode.
- RecursiveGroups SwitchParameter
- Gets or sets whether to resolve recursive parent groups in identity mode.
- Scope DirectoryScenarioScope
- 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 + FirstParameters
- Domain string[]
- Gets or sets domain DNS names. In list mode defaults to current domain.
- Filter string[]
- Filter categories in list mode. Multiple values allowed.
- First int
- Limits the number of returned rows after -Skip in list mode.
- IncludeTrustedDomains SwitchParameter
- Includes trusted domains when using forest-based scopes.
- MinInactiveDays int
- Minimum days of inactivity (LastLogon/LastLogonTimestamp) in list mode.
- MinPasswordAgeDays int
- Minimum password age in days (pwdLastSet) in list mode.
- PropertySet UserProperties
- Property set to retrieve in list mode. Possible values: Basic, Full
- Possible values:
Basic,Full - ResolveTrueLastLogon SwitchParameter
- Resolve authoritative lastLogon across all DCs in list mode.
- Scope DirectoryScenarioScope
- Default scope used when -Domain is not provided. Possible values: CurrentDomain, Forest, TrustedForests, ExplicitDomains
- Possible values:
CurrentDomain,Forest,TrustedForests,ExplicitDomains - ServiceAccountsOnly SwitchParameter
- Shortcut to include only service accounts in list mode.
- Skip int
- Skips the specified number of rows after deterministic ordering in list mode.
- TrueLastLogonDop int
- Parallelism for true last logon resolution in list mode (default 4).
- View AdxUsersView
- 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