Skip to content
Menu
The Lonely Administrator
  • PowerShell Tips & Tricks
  • Books & Training
  • Essential PowerShell Learning Resources
  • Privacy Policy
  • About Me
The Lonely Administrator

PowerShell Deep Dive Treasure

Posted on April 26, 2011

Without a doubt the PowerShell Deep Dive conference was one of the best meetings I've ever attended and I wanted to share one tidbit I came away with that I find immensely useful and never knew. During one of Bruce Payette's talks he tossed out, practically as an aside, a reference to searching command line history with the # character. What!!???

Manage and Report Active Directory, Exchange and Microsoft 365 with
ManageEngine ADManager Plus - Download Free Trial

Exclusive offer on ADManager Plus for US and UK regions. Claim now!

I never heard of this and it is very slick. From the command prompt (either the console or ISE) enter the # character followed by whatever part of a previous command you remember. It does not have to be the start of the command, it can be any part of it. Then press TAB. PowerShell will search your history buffer and return the first match. If there are multiple matches you can keep pressing TAB to cycle through them. Awesome! The beauty for me is that it just brings the command back to the prompt so you can edit it.

Thank you Bruce!


Behind the PowerShell Pipeline

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to print (Opens in new window) Print
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...

Related

3 thoughts on “PowerShell Deep Dive Treasure”

  1. Wes Stahler says:
    April 26, 2011 at 8:54 pm

    Awesome tip! Thanks for sharing Jeff

  2. Alex says:
    April 29, 2011 at 10:46 am

    Nice tip!

    But to be honest i have been doing this in tcsh on UNIX via ESC-P for about 15 years 🙂

    -Alex

  3. Pingback: PowerShell Deep Dive Treasure - The Lonely Administrator - Powershell.com – Powershell Scripts, Tips and Resources

Comments are closed.

reports

Powered by Buttondown.

Join me on Mastodon

The PowerShell Practice Primer
Learn PowerShell in a Month of Lunches Fourth edition


Get More PowerShell Books

Other Online Content

github



PluralSightAuthor

Active Directory ADSI Automation Backup Books CIM CLI conferences console Friday Fun FridayFun Function functions Get-WMIObject GitHub hashtable HTML Hyper-V Iron Scripter ISE Measure-Object module modules MrRoboto new-object objects Out-Gridview Pipeline PowerShell PowerShell ISE Profile prompt Registry Regular Expressions remoting SAPIEN ScriptBlock Scripting Techmentor Training VBScript WMI WPF Write-Host xml

©2025 The Lonely Administrator | Powered by SuperbThemes!
%d