Active Directory operations reference covering identity, replication, FSMO, DNS, Kerberos, GPO
Domain & DC context
Get-CimInstance Win32_ComputerSystem | Select-Object Name,Domain,PartOfDomainConfirms domain membership before authentication troubleshooting.
nltest /dsgetdc:exemple.localShows the located DC and capability flags.
nltest /dsgetsiteChecks the AD site mapped to the client subnet.
Get-ADDomainController -Filter * | Select-Object HostName,Site,IPv4Address,IsGlobalCatalogRequires the ActiveDirectory RSAT module.
Users, groups & computers
Get-ADUser j.dupont -Properties Enabled,LockedOut,PasswordLastSet,LastLogonDateAvoid -Properties * when only a few properties are needed.
Search-ADAccount -LockedOut -UsersOnlyUseful to confirm active lockouts.
Get-ADPrincipalGroupMembership j.dupont | Select-Object NameChecks resolved group memberships.
Get-ADComputer PC-001 -Properties Enabled,LastLogonDate,OperatingSystemChecks state, reported OS and recent activity.
Replication
repadmin /replsummaryFirst check for replication errors and latency.
repadmin /showrepl DC01Shows partners, naming contexts and last replication.
repadmin /queue DC01A persistent queue can indicate connectivity or load issues.
dcdiag /e /c /vVery verbose and potentially slow; run deliberately.
FSMO & roles
netdom query fsmoShows all five FSMO role holders.
Get-ADDomain | Select-Object PDCEmulator,RIDMaster,InfrastructureMasterPowerShell view of domain-level roles.
Get-ADForest | Select-Object SchemaMaster,DomainNamingMaster,GlobalCatalogsPowerShell view of forest roles and global catalogs.
For domain time issues, start with the PDC Emulator.
DNS, Kerberos & time
Resolve-DnsName _ldap._tcp.dc._msdcs.exemple.local -Type SRVConfirms DC service records are published.
klistLists Kerberos tickets in the current session.
w32tm /query /statusKerberos depends on coherent time.
w32tm /query /sourceSpots unexpected sources such as Local CMOS Clock.
Group Policy
gpresult /rShows applied and filtered GPOs by context.
gpresult /h C:Tempgpresult.htmlEasier for analyzing settings and filtering reasons.
gpupdate /forceDoes not fix processing errors; inspect logs if failure persists.
Get-WinEvent -LogName Microsoft-Windows-GroupPolicy/Operational -MaxEvents 50Shows processing extensions and detailed errors.
Secure channel & authentication
Test-ComputerSecureChannel -VerboseOn a member computer, validates trust with the domain.
nltest /sc_verify:exemple.localNative alternative without the AD PowerShell module.
Test-ComputerSecureChannel -Repair -Credential (Get-Credential)Use only after DNS, time and DC connectivity checks.
w32tm /stripchart /computer:DC01 /samples:5 /dataonlyQuickly measures time offset against a DC.
Events & health
Get-WinEvent -FilterHashtable @{LogName='System';ProviderName='Microsoft-Windows-Kerberos-Key-Distribution-Center'} -MaxEvents 30 -ErrorAction SilentlyContinueCorrelate time, SPN and affected account.
Get-WinEvent -FilterHashtable @{LogName='System';ProviderName='NETLOGON'} -MaxEvents 30 -ErrorAction SilentlyContinueUseful for DC discovery and secure-channel issues.
Get-WinEvent -LogName 'Directory Service' -MaxEvents 50Run on a domain controller.
Capture state before replication or trust repairs.
Key points
- DNS and time synchronization are primary Active Directory prerequisites.
- Avoid Domain Admin for daily work; use delegated administrative accounts.
- Do not reset secure channels before excluding DNS, NTP and DC connectivity.
- Interpret repadmin/dcdiag in the context of site topology and replication schedules.