PowerShell history

PSReadLine keeps a per-user history of commands typed into the interactive PowerShell console, in ConsoleHost_history.txt under AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine.

WindowsExecutionParser: powershell_history6 fieldsCollected by priority triage

What PowerShell History is

Execution artifacts record that a program was present or ran: what, where from, how often and when. They are the core of "what did the attacker run?"

Forensic value

What PowerShell History can tell an investigator:

  • The exact commands an attacker or user typed, in order.
  • Context that event logs may not have when script block logging is off.

What it does not prove

  • There are no timestamps; place lines using other evidence.
  • Only interactive console input is recorded, not scripts or remote commands.
  • The file is easy to delete, and its deletion is visible in the USN Journal.

Where it is stored

Arcsentry looks for PowerShell History at this location inside a collection, disk image or mounted volume:

**/Users/*/AppData/Roaming/Microsoft/Windows/PowerShell/PSReadLine/ConsoleHost_history.txt

What Arcsentry records

Each PowerShell History record is written to Arcsentry's common schema with these fields, alongside the host, timestamp and provenance every record carries:

FieldTypeMeaning
event_reasonVARCHAREvent reason
log_line_numberBIGINTLine number within the source log file
messageVARCHARHuman-readable message
mru_orderBIGINTMru order
process_command_lineVARCHARProcess command line
source_file_modifiedTIMESTAMPModification time of the source artifact file, carried only on records that lack a parsed event timestamp (substituted-time provenance, never a forensic event time)

Time

Arcsentry keeps each record's own time and labels its time zone when the source does not state one. A record with no time of its own stays untimed; Arcsentry never substitutes the collection time.

Collecting PowerShell History with Arcsentry Collector

Arcsentry Collector gathers PowerShell History in these triage profiles: windows::profile::triage::priority, windows::profile::triage::full. It is read straight from the file system, on a live host or inside a disk image, without mounting.

The collection targets that pick it up: windows::logs::power_shell_console, windows::system_state::ssh_tunnel_command_artifacts.

.\arcsentry-collect.exe collect --local -t windows::profile::triage::priority `
  -o E:\IR -f host.arcx --password-file E:\IR\pw.txt

Every file lands in one AES-256 archive with a SHA-256 recorded for it, and the collection log notes which target collected it. See everything each profile collects.

Already collected with something else? Arcsentry also reads KAPE, Velociraptor and UAC collections, so PowerShell History can come from the tools you already use.

Analysing PowerShell History in Arcsentry

Ask in plain English, for example "show PowerShell History records from the incident window, newest first", and Arcsentry shows the query before it runs. Or write it in AQL:

filter event_type == "powershell_history"
sort {-timestamp}
take 100

Mark a record malicious or suspicious and it joins the timeline in its kill-chain lane. Add its values as indicators and Arcsentry matches them across every host. When the AI investigator works the case, it reads PowerShell History records with the same tools and cites them by event ID.

Corroborate with

No single artifact settles a question on its own. Check PowerShell History against:

Frequently asked

Does PowerShell history have timestamps?

No. Use PowerShell script block events (4104), process creation (4688) and file-system times to place commands in time.

Does Arcsentry parse PowerShell History?

Yes. Arcsentry's PowerShell History parser (powershell_history) reads it from Windows evidence and records 6 fields per record, with provenance back to the source file.

How do I collect PowerShell History?

Arcsentry Collector gathers it with the priority triage profile (windows::profile::triage::priority), live or from a disk image, sealed in an AES-256 archive with a SHA-256 for every file.

Parse PowerShell History on your own evidence.

Tell us what you want to investigate. A person replies within one business day with the download and a trial licence.

Request a trial