A Better PowerShell Console with Custom PSReadLine Functions

Document created by eric.senunas on Jun 20, 2014
Version 1Show Document
  • View in full screen mode

From A Better PowerShell Console with Custom PSReadLine Functions - Hey, Scripting Guy! Blog - TechNet Blogs



Summary: Microsoft Scripting Guy, Ed Wilson, talks about a better Windows PowerShell console experience by using custom PSReadLine functions.

Microsoft Scripting Guy, Ed Wilson, is here. I was reading an interesting article the other day. The author was talking about movies and history. The author said that in reality it does not matter if a historical movie has any basis in reality at all. The reason is that we really cannot know what things were like—say a thousand years ago. We have glimpses, slivers of light, but by-and-large, a lot of what we perceive is subject to interpretation.

We do not even need to go back a thousand years ago. For example, lots of people do not really think there was a person named William Shakespeare. (Some people think he was Francis Bacon, Christopher Marlowe, or someone else.) We have a lot more evidence for the bard of Stratford-upon-Avon, than what types of horses medieval knights rode into battle.

But one thing that is not subject to interpretation is that before I found PSReadLine editing, using the Windows PowerShell console was often frustrating (with problems in command history for commands that spanned multiple lines). At times, it was even infuriating. (Remember the edit/Tab problem in Windows PowerShell 1.0 where it would erase everything to the end of the line when you pressed Tab complete? If not, you are lucky.) But now that I have PSReadLine, those days are as far gone as ambling Palfreys in A Midsummer Night’s Dream.

     Note  This is PSReadLine Week. You might also be interested in reading the following posts:

Customizing PSReadLine

Read about how to customize PSReadLine at A Better PowerShell Console with Custom PSReadLine Functions at TechNet Blogs

1 person found this helpful