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
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.

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.