How to find command history?
By default Windows PowerShell keeps track of the most recent 64 commands typed in the console window; when you invoke the Get-History cmdlet only the 32 most recent of those commands are displayed (e.g., commands 33 through 64). So how do you view commands 1 through 32? In that case you tell Get-History to start with command 32 and count backwards (using the -count parameter) 32 times. Don’t worry; that sounds more complicated than it really is:
Incidentally, for any given Windows PowerShell
session you can change
the number of commands that Windows PowerShell keeps track of; that can be done by modifying the $MaximumHistoryCount variable
. For example, would you prefer that Windows PowerShell keep track of your last 150 commands? Okey-doke:
$MaximumHistoryCount = 150
(Visited 61 times, 1 visits today)