Filter:
MyModule Active Directory & Hybrid Infrastructure Functions v1.7 · PowerShell
PowerShell
~155 lines MyModule

Get-ADTargetServer

DC Resolution Helper

Resolves the correct writable domain controller for any identity across the full AD forest. Queries the Global Catalog (auto-discovered or explicit) and extracts the domain DNS name from the returned DistinguishedName. Discovers a writable DC with explicit RODC exclusion via -Writable. Accepts SamAccountName, UPN, email, DistinguishedName, or ObjectGUID. Supports -PreferredSite with automatic cross-site fallback. Reusable helper consumed by Get-MyUser and all module functions requiring domain-aware DC resolution.

-Identity [string] Required · Pipeline
-GlobalCatalog [string] Optional · Auto-discover
-PreferredSite [string] Optional · With fallback
AD Multi-Domain Infrastructure
PowerShell
~260 lines MyModule

Test-MyUserStatus

Account Health Check

Comprehensive AD account health evaluation covering disabled state, lockout, account and password expiry, smart card requirement, workstation restrictions, and logon hour restrictions. Optionally validates credentials interactively via System.DirectoryServices.AccountManagement. Returns a structured PSCustomObject with a typed Checks array — suitable for pipeline, CSV export, or bulk remediation workflows.

-Username [string] Required · Pipeline
-SkipCredentialTest [switch] Optional
-PreferredSite [string] Optional
AD Identity Reporting Multi-Domain
PowerShell
~165 lines MyModule

Get-MyUser

Forest-Wide User Lookup

Retrieves AD user objects from any domain in the forest with no hardcoded server references. Delegates DC resolution to Get-ADTargetServer, then performs a full DC query for all attributes including msDS-ResultantPSO, msDS-UserPasswordExpiryTimeComputed, and replication metadata for last status change tracking. Supports raw property passthrough via -Properties for pipeline flexibility.

-Username [string] Required · Pipeline
-PreferredSite [string] Optional
-Properties [Array] Optional · Raw mode
-DomainController [string] Optional · Override
AD Identity Multi-Domain
No scripts match that filter.