Windows Exchange PowerShell Cmdlet History File Deleted
Flags deletion of Exchange PowerShell cmdlet history log files in the expected logging directory.
- Product
- windows
- Category
- file_delete
- Author
- Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
- Published
- 2022-10-26
- Updated
- 2026-10-14
ATT&CK techniques
Defense EvasionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule identifies deletions of Exchange-related PowerShell cmdlet history files by matching specific directory and filename patterns under Windows log storage. Attackers may remove these artifacts to reduce visibility into PowerShell activity and hinder forensic investigation. The detection relies on file deletion telemetry with the deleted target filename containing the expected path elements.
Reporting behind it
- web.archive.orghttps://web.archive.org/web/20221012062917/https://m365internals.com/2022/10/07/hunting-in-on-premises-exchange-server-logs/
- it-server-room.comhttps://www.it-server-room.com/en/exchange-server-log-file-locations-and-cleanup-guide/
- github.comhttps://github.com/SigmaHQ/sigma/blob/master/rules/windows/file/file_delete/file_delete_win_delete_exchange_powershell_logs.yml
Changelog
v4- v4Candidate ingested via manual entry.2026-10-14
- v2Candidate ingested via manual entry.2026-07-31
- v1No 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.
title: Windows Exchange PowerShell Cmdlet History File Deleted
id: e9a31e9d-0788-48de-a229-3edbea310f62
status: test
description: This rule identifies deletions of Exchange-related PowerShell cmdlet history files by matching specific directory and filename patterns under Windows log storage. Attackers may remove these artifacts to reduce visibility into PowerShell activity and hinder forensic investigation. The detection relies on file deletion telemetry with the deleted target filename containing the expected path elements.
references:
- https://web.archive.org/web/20221012062917/https://m365internals.com/2022/10/07/hunting-in-on-premises-exchange-server-logs/
- https://www.it-server-room.com/en/exchange-server-log-file-locations-and-cleanup-guide/
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/file/file_delete/file_delete_win_delete_exchange_powershell_logs.yml
author: Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2022-10-26
modified: 2026-10-13
tags:
- attack.stealth
- attack.t1070
logsource:
category: file_delete
product: windows
detection:
selection:
TargetFilename|contains|all:
- \Logging\CmdletInfra\LocalPowerShell\Cmdlet\
- _Cmdlet_
condition: selection
falsepositives:
- Possible FP during log rotation
level: high
license: DRL-1.1
related:
- id: a55349d8-9588-4c5a-8e3b-1925fe2a4ffe
type: derived