DET-100 · human · confidence Medium

PowerShell History File Absent

A user who has run PowerShell has no PSReadLine history file on disk.

Every interactive PowerShell user on a modern Windows build gets a ConsoleHost_history.txt file once they type commands. If the file is gone for an account that is known to have used PowerShell, someone probably deleted it. Insiders do this after running recon, copying data, or using admin tooling they would rather not explain. On its own it is a lead, not proof, so pair it with other signs of clean-up.

Data sources
EDR process and file eventsEndpoint triage collectionWindows Prefetch
Platforms
Windows

Logic

Per user profile on each endpoint:
1. Check whether PSReadLine\ConsoleHost_history.txt exists.
2. Check whether powershell.exe or pwsh.exe shows in EDR process events or Prefetch for that user.
3. Alert on 'used PowerShell, no history file', then look for a file delete event near the last PowerShell run.

False positives

Service accounts and users who only run scripts non-interactively never create the file. Group Policy or tooling that disables PSReadLine history also causes this.

Catches 2 techniques