CmdID

CmdID / Commands

clear-history

Delete entries from the PowerShell session command history. tldr-pages

On Windows

Opens CmdID with your command. It is read in your browser and sent nowhere.

Windows

from tldr-pages, CC BY 4.0

Delete entries from the PowerShell session command history. Note: clhy can be used as an alias for Clear-History.

Clear all command history from current session

Clear-HistoryIdentify

Clear command by specific name

Clear-History -CommandLine "command"Identify

Clear multiple commands by name

Clear-History -CommandLine "command1", "command2", ...Identify

Clear a specific history entry by ID

Clear-History -Id id_numberIdentify

Clear multiple IDs

Clear-History -Id id1, id2, ...Identify

Clear commands within a range of IDs

Clear-History -Id (start_id..end_id)Identify

Simulate clearing the history, showing what would be deleted

Clear-History -WhatIfIdentify

Ask for confirmation before clearing

Clear-History -ConfirmIdentify