PoshTip #49 – PSReadLine Module

The PSReadline module contains cmdlets that let you customize the command-line editing environment in Windows PowerShell. The module is a part of PowerShell 5. PSReadLine module extends the PowerShell console features such as:

  • Highlighting syntax
  • Selecting the text
  • Copying and Pasting the text using CTRL+C and CTRL+V

This module is automatically imported when opening the PowerShell console. You can display information about this module:

You can view the current settings using the following command:

Now, you can change some settings using the Set-PSReadlineOption cmdlet. Below, I want to specify a new value for the « CommentForegroundColor » option:

Here is an example:

 

Thanks for reading! You can follow me on Twitter @PrigentNico

About Nicolas 196 Articles
I work as a System Engineer, based in Switzerland with a primary focus on Microsoft technologies. I have 7 years experience in administering Windows Servers. . I am a Microsoft MVP for Cloud & Datacenter Management. I also received the PowerShell Hero 2016 award by PowerShell.0rg. And finally, I am "MCSA: Windows Server 2012" and "Administering & Deploying SCCM" certified.