PowerShell Get-ADComputer Cmdlet Used for Computer Discovery and File Export

Flags PowerShell Get-ADComputer wildcard enumeration followed by writing exported computer data to a file.

FreeReviewedSigma · Medium · v2
Product
windows
Category
ps_script
Author
Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2022-11-17
Updated
2026-07-31

ATT&CK techniques

Discovery
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Execution

  5. Persistence

  6. Priv Esc

  7. Defense Evasion

  8. Cred Access

  9. Lateral Movement

  10. Collection

  11. C2

  12. Exfiltration

  13. Impact

What it detects

This rule flags PowerShell script block content that runs the Get-ADComputer cmdlet with a wildcard filter for broad computer discovery, then selects and writes results to a file using commands such as Out-File, Set-Content, or Add-Content. Attackers may use this pattern to enumerate target systems from Active Directory and stage collected inventory for later access or operational use. It relies on Script Block Logging telemetry capturing the executed script text.

Related detections9 linkedT1033 — drag to rearrange
Suspicious Whoami Discovery Spawned by Windows Script Host via Process Creation (via process_creation)
Suspicious Localized Administrator Account and Group Enumeration After Citrix Bleed Exploitation
Malicious Recon Output Staged in Qlik Sense Fonts Directory by Cactus Ransomware
Suspicious Host Reconnaissance Command Chain via cmd
Malicious Child Process Spawned From n8n Node Process
Suspicious Credential Enumeration via cmdkey List
Suspicious IIS Worker Process Spawning Whoami Reconnaissance
Suspicious Whoami Execution With Output Redirected to a File (via process_creation)
Possible Logged-On Session Discovery via Quser or Qwinsta (via process_creation)
PowerShell Get-ADComputer Cmdlet Used for Computer Discovery and File Export
Pivot detection · T1033 · 9 related

Changelog

v2
  1. v2
    Candidate ingested via manual entry.2026-07-31
  2. v1
    No changelog recorded for this version.2026-07-30

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.