Cheat sheet

Active Directory — Essential Controls

Active Directory operations reference covering identity, replication, FSMO, DNS, Kerberos, GPO, time, secure channel and health checks.

⌚ About 3 min read
View my favorites
Active DirectoryIntermediate to advanced8 sections · 32 reference points

Active Directory operations reference covering identity, replication, FSMO, DNS, Kerberos, GPO

Domain & DC context

Computer domain
Get-CimInstance Win32_ComputerSystem | Select-Object Name,Domain,PartOfDomain

Confirms domain membership before authentication troubleshooting.

Locate a DC
nltest /dsgetdc:exemple.local

Shows the located DC and capability flags.

AD site
nltest /dsgetsite

Checks the AD site mapped to the client subnet.

Known DCs
Get-ADDomainController -Filter * | Select-Object HostName,Site,IPv4Address,IsGlobalCatalog

Requires the ActiveDirectory RSAT module.

Users, groups & computers

User
Get-ADUser j.dupont -Properties Enabled,LockedOut,PasswordLastSet,LastLogonDate

Avoid -Properties * when only a few properties are needed.

Locked accounts
Search-ADAccount -LockedOut -UsersOnly

Useful to confirm active lockouts.

User groups
Get-ADPrincipalGroupMembership j.dupont | Select-Object Name

Checks resolved group memberships.

Computer
Get-ADComputer PC-001 -Properties Enabled,LastLogonDate,OperatingSystem

Checks state, reported OS and recent activity.

Replication

Summary
repadmin /replsummary

First check for replication errors and latency.

DC details
repadmin /showrepl DC01

Shows partners, naming contexts and last replication.

Replication queue
repadmin /queue DC01

A persistent queue can indicate connectivity or load issues.

Global diagnostics
dcdiag /e /c /v

Very verbose and potentially slow; run deliberately.

FSMO & roles

FSMO roles
netdom query fsmo

Shows all five FSMO role holders.

Domain info
Get-ADDomain | Select-Object PDCEmulator,RIDMaster,InfrastructureMaster

PowerShell view of domain-level roles.

Forest info
Get-ADForest | Select-Object SchemaMaster,DomainNamingMaster,GlobalCatalogs

PowerShell view of forest roles and global catalogs.

PDC Emulator
Référence de temps et rôle critique pour plusieurs opérations

For domain time issues, start with the PDC Emulator.

DNS, Kerberos & time

LDAP SRV
Resolve-DnsName _ldap._tcp.dc._msdcs.exemple.local -Type SRV

Confirms DC service records are published.

Kerberos tickets
klist

Lists Kerberos tickets in the current session.

Time status
w32tm /query /status

Kerberos depends on coherent time.

Time source
w32tm /query /source

Spots unexpected sources such as Local CMOS Clock.

Group Policy

GPO summary
gpresult /r

Shows applied and filtered GPOs by context.

HTML report
gpresult /h C:Tempgpresult.html

Easier for analyzing settings and filtering reasons.

Refresh
gpupdate /force

Does not fix processing errors; inspect logs if failure persists.

GPO operational log
Get-WinEvent -LogName Microsoft-Windows-GroupPolicy/Operational -MaxEvents 50

Shows processing extensions and detailed errors.

Secure channel & authentication

Test secure channel
Test-ComputerSecureChannel -Verbose

On a member computer, validates trust with the domain.

Verify with nltest
nltest /sc_verify:exemple.local

Native alternative without the AD PowerShell module.

Repair
Test-ComputerSecureChannel -Repair -Credential (Get-Credential)

Use only after DNS, time and DC connectivity checks.

Time skew
w32tm /stripchart /computer:DC01 /samples:5 /dataonly

Quickly measures time offset against a DC.

Events & health

Kerberos events
Get-WinEvent -FilterHashtable @{LogName='System';ProviderName='Microsoft-Windows-Kerberos-Key-Distribution-Center'} -MaxEvents 30 -ErrorAction SilentlyContinue

Correlate time, SPN and affected account.

Netlogon events
Get-WinEvent -FilterHashtable @{LogName='System';ProviderName='NETLOGON'} -MaxEvents 30 -ErrorAction SilentlyContinue

Useful for DC discovery and secure-channel issues.

AD DS events
Get-WinEvent -LogName 'Directory Service' -MaxEvents 50

Run on a domain controller.

Before change
Capturer repadmin + dcdiag + heure + DNS

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.
← All cheat sheets
♡ 0