How to Audit Active Directory in 8 Read-Only Steps — OC Security Audit
How-to guide

How to Audit Active Directory in 8 Read-Only Steps

Built-in commands your administrator can run today to see domain controllers, admins, stale accounts and password policy, without changing anything.

Every command on this page only reads — OC Security Audit
Read-only

Every command on this page only reads

Get-* cmdlets, repadmin and dcdiag in report mode. Run them from a domain-joined computer with the RSAT tools.

140 controls, evidence and a roadmap — OC Security Audit
Or let us do it

140 controls, evidence and a roadmap

Our audit runs far more than these 8 steps and turns them into reports your owner and your admin can act on.

25+ yearsIT & cybersecurity experience
Certified expertsCISSP · C|CISO · Microsoft · Cisco
Southern CaliforniaLocal and on-site, based in Irvine
NationwideRemote audits & advisory
Before you start

What you need

A domain-joined computer with the RSAT Active Directory and DNS tools, Windows PowerShell 5.1 and a domain account. Every command below only reads; none of them changes the directory. Replace DC01 with the name of one of your domain controllers.

The steps

Eight read-only steps

01

Inventory your domain controllers

List every domain controller with its site, operating system and roles. Anything on Windows Server 2016 needs a plan before January 12, 2027; Windows Server 2012 R2 gets no more security fixes.

Get-ADDomainController -Filter * |
  Select-Object Name, Site, OperatingSystem, IsGlobalCatalog, IsReadOnly
02

Check replication

A summary of replication between domain controllers, then any failures the directory knows about.

repadmin /replsummary
Get-ADReplicationFailure -Scope Domain -Target (Get-ADDomain).DNSRoot
03

Run the domain controller health tests

dcdiag in quiet mode prints only failed tests. Never add /fix during an audit: that changes things.

dcdiag /q
04

List who has full control

Every member of Domain Admins and Enterprise Admins, including nested groups, and the age of the krbtgt key password.

Get-ADGroupMember -Identity "Domain Admins" -Recursive | Select-Object Name, SamAccountName
Get-ADGroupMember -Identity "Enterprise Admins" -Recursive | Select-Object Name, SamAccountName
Get-ADUser krbtgt -Properties PasswordLastSet | Select-Object PasswordLastSet
05

Read the password policy

The default domain policy and any fine-grained policies. Compare the minimum length and lockout threshold with your security standard.

Get-ADDefaultDomainPasswordPolicy
Get-ADFineGrainedPasswordPolicy -Filter *
06

Find stale and never-expiring accounts

Enabled users with no sign-in for 90 days, and enabled users whose password never expires.

Search-ADAccount -AccountInactive -TimeSpan 90.00:00:00 -UsersOnly |
  Where-Object Enabled | Select-Object Name, LastLogonDate
Get-ADUser -Filter 'PasswordNeverExpires -eq $true -and Enabled -eq $true' | Select-Object Name
07

Find accounts exposed to offline password cracking

User accounts with a service principal name can be targeted by any domain user. Old passwords on these accounts are the priority.

Get-ADUser -LDAPFilter "(servicePrincipalName=*)" -Properties ServicePrincipalName, PasswordLastSet |
  Select-Object Name, PasswordLastSet
08

Check DNS zone update settings

Zones should accept secure dynamic updates only. Run it against a DNS server, usually a domain controller.

Get-DnsServerZone -ComputerName DC01 |
  Select-Object ZoneName, ZoneType, DynamicUpdate, IsDsIntegrated
What these steps miss

Eight steps are a start, not an audit

What a full audit adds

Certificate templates, Group Policy permissions and stored passwords, AdminSDHolder, file share permissions on every server, Hyper-V, backups and remote access: 140 controls with evidence, scored and mapped to NIST CSF 2.0, ISO 27001 and CIS v8.

Open the full checklist

Have it done for you

The audit collects all of it in one read-only run and turns it into five reports and a roadmap, for one fixed price.

See pricing
Reading the results

What common results mean

The commands show facts. This is how those facts usually translate into risk for a small or mid-sized business.

ResultWhat it means
More than a few Domain AdminsEach member is a full-control account an attacker can target. Most businesses need only two or three, used only for administration.
krbtgt password unchanged for yearsForged Kerberos tickets stay usable for longer. Microsoft’s guidance is to reset it twice, allowing replication in between.
Replication failuresDomain controllers disagree about accounts and policies, so a disabled account or a password change may not apply everywhere.
Short password length or no lockoutPassword guessing becomes practical, especially against accounts that never sign in interactively.
Domain controllers on unsupported Windows ServerNo more security fixes. Plan the upgrade before the support end date, not after.
Ali Hassani, CISO, OC Security Audit
CISO-led audit

Guided by Ali Hassani, CISO

Certified CISO (C|CISO) and CISSP with 25+ years in IT, cybersecurity, compliance and infrastructure, and dozens of Microsoft and Cisco certifications, including MCSE, MCITP, MCSA Security, CCNP and CCNA. Every Active Directory audit is read-only, evidence-based and written so an owner and an administrator can both act on it.

FAQ

Questions about auditing Active Directory

Is it safe to run these commands on a production domain?

Yes. Every command in this guide only reads information. Avoid options such as dcdiag /fix, which make changes.

Do I need Domain Admin rights to run them?

No. Most of them work with an ordinary domain account, because Active Directory lets authenticated users read most directory information. That is also why an attacker with one stolen account can map a domain so quickly.

How often should Active Directory be audited?

At least once a year, and after major changes such as a merger, a new domain controller or a security incident.

IT team in a data center reviewing Active Directory audit results

Know how your domain would hold up, before an attacker tests it

Schedule a consultation. We scope the Active Directory and Windows Server audit in 30 minutes and quote one fixed price: $3,500, any organization size.

Read-only audit. No changes to your systems. Irvine, Orange County and Southern California on-site; remote nationwide.