Forum Discussion

RichardSmith's avatar
RichardSmith
Copper Contributor
Jul 25, 2024

How to delete Powershell command history?

I possess confidential data from a previous command in the history logs, and attempting to clear the history using Clear-History on Powershell 7 proved unsuccessful.

  • KenzoKK's avatar
    KenzoKK
    Copper Contributor
    Remember that history is session-specific, so any entries recorded in a single session can be cleared without affecting other sessions. Make sure to configure these settings at the start of each new session if you're frequently entering sensitive commands.