IncidentResponsev2

AD Configuration Scan with PowerShell

Task Evaluate Active Directory (AD) Configurations using PowerShell

Conditions

Given an incident response workstation with PowerShell configured, Domain Administrator-level credentials, and a target Domain.

Operator Note: Authorization from the network owner is required before accessing and scanning AD structures.

Standards

Operator Note: Captured data should be stored securely and compared to baselines to identify unauthorized changes.

End State

AD configuration information for the target domain is output to a text or XML file for later comparison.

Operator Note: Reports should be retained for post-incident analysis and forensic review.

Manual Steps

Using a team laptop that is NOT a member of the domain:

  1. Launch 2.15_AD_Enumeration_FromExternal.ps1 PowerShell script.
  2. Input required information when prompted:
Domain credentials: DOMAIN\username (i.e. team02\Administrator)
Domain Controller name: (i.e. team02-dc01)
Domain name: (i.e. team02.tgt)
  1. Allow script to run (may take 5–10 minutes).
  2. Upon completion, review exported results:
C:\Temp\export.txt
  1. To compare results later:

Operator Note: Comparing AD structure over time helps detect persistence mechanisms such as rogue service accounts or group modifications.

Running Script

.\2.15_AD_Enumeration_FromExternal.ps1
C:\Temp\export.txt

Dependencies

Import-Module ActiveDirectory

Other available tools

Import-Module PowerView
Get-NetDomain
Get-NetOU
Get-NetUser

Operator Note: PowerView is an advanced operator tool useful for deeper relationship enumeration (offensive/defensive). Use cautiously.

References

Microsoft PowerShell Overview
RSAT: Active Directory Module
PowerView GitHub


Operator Recommendations and Additional Tools

Operator Checklist

Tools by Platform

Platform Tool Purpose
Windows PowerShell + AD Module Primary method for AD enumeration
Windows ADManager Plus, ADAudit Plus GUI-based enterprise tools
Windows/Linux PowerView (optional, advanced use) Advanced AD enumeration for operators

Alternate Commands

Enumerate Domain Controllers (quick check):

Get-ADDomainController -Filter *

Enumerate all AD Users:

Get-ADUser -Filter * -Properties *

Legacy (CMD):

net group "Domain Admins" /domain

Best Practices


Revision History

Date Version Description Author
2025-05-02 1.8 Full original + enriched PowerShell AD configuration scan procedures and tooling Leo