Is there an auditable file on a Windows machine that shows the command-line history for either cmd or PowerShell? On UNIX machines I believe there is a hidden file in the home directory called .history.
Windows – .history file on Windows machines
command-line-interfacepowershellwindows
Related Topic
- Windows – What’s the command-line utility in Windows to do a reverse DNS look-up
- Windows – global, persistent CMD history
- Powershell – Windows command prompt: how to get the count of all files in current directory
- Linux – How to display certain lines from a text file in Linux
- Powershell – Installing an SSL Certificate in Windows Server 2008 using powershell
- Linux – Strange bash history behaviour when running multiple sessions
- Windows – Programmatically Create New User Profile
Best Answer
For plain old
cmd
, no there really isn't anything like that.Even under PowerShell, I believe the history is still limited to the lifetime of the PowerShell session, though it gives you the functionality to work with and export the history, and even load it. You can use that to create some helper scripts to load and save your history easily as demonstrated here, but nothing out-of-the-box.