Windows Vista Forums

PowerShell History
  1. #1
    dmex's Avatar

    ɠɛɐǨ

    Join Date : May 2007
    Fremantle, Western Australia
    Posts : 2,632
    Windows Vista™ Ultimate
    Local Time: 05:57 PM
    australia au west australia

    PowerShell History

    The Lazy Admin : PowerShell History

    DOSKEY was used to enable you to recall and edit previously entered commands within the Command.exe (or CMD.exe). PowerShell takes this idea to the next level with the Get-History command.

    By entering Get-History in PowerShell you will be shown a list of the most recent cmdlets that have been run.

    To run a cmdlet again, it is as simple as running the invoke-history cmdlet.

    You can get a more specific list of cmdlets run by piping "where {$_.commandLine -like "variable"}" This will display all cmdlets that have been run that match the variable, and wildcards are acceptable.
    get-history | where {$_.commandLine -like "*process*"}


    The get-history cmdlet buffer will hold the last 64 commands run. You can increase this by running the following command.
    $MaximumHistoryCount=#### (replace #### with the number)





    Last edited by dmex; 29 Jun 2008 at 05:58 AM.
      My System SpecsSystem Spec

PowerShell History problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing PowerShell dependent features on W2K8 with PowerShell CTP Greg Wojan PowerShell 14 16 May 2008
when run powershell script as windows service ,powershell fail powershell fail on winodws 2008 PowerShell 6 15 Jan 2008
Powershell Plus - Free for non commercial Use and Powershell Analyzer1.0 released Karl Prosser[MVP] PowerShell 2 12 Dec 2007
Automatic PowerShell Error Parsing in PowerShell Analyzer and PowerShellPlus Karl Prosser[MVP] PowerShell 0 14 Nov 2007
PowerShell Leaders Join Forces and offer a pre-release version of PowerShell for 50% off the retail value klumsy@xtra.co.nz PowerShell 0 19 Jun 2007