Ying Li at myITforum.com

PowerShell & System Center

PowerShell commands history buffer

The Windows PowerShell command console maintains a list of commands that you executed during the current session – history buffer.

You can view the history buffer by pressing the F7 key. You can then execute any command in the list by scroll up/down the list and press Enter.

You can also use get-history cmdlet to get the list of entries of history buffer:

PS C:\Myworkplace\PS> get-history

  Id CommandLine
  -- -----------
   1 get-process
   2 Get-ChildItem
   3 get-alias

You can then execute any of the commands in the list by using the invoke-history cmdlet:

invoke-history 2

So the choices are yours…
  

 

Posted: Jul 27 2007, 12:50 PM by yli628 | with no comments
Filed under:

Comments

No Comments