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 270 Articles
I work as an IT Production Manager, based in Paris (France) with a primary focus on Microsoft technologies. I have 10 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 "MCSE: Cloud Platform and Infrastructure", "MCSA: Windows Servers", "Administering & Deploying SCCM", and CheckPoint CCSA certified.