Change console's Intellisense Colors

Welcome Forums General PowerShell Q&A Change console's Intellisense Colors

This topic contains 3 replies, has 3 voices, and was last updated by

1 year, 6 months ago.

  • Author
  • #78160

    Points: 0
    Rank: Member

    Hello, I have been making basic scripts with Powershell for a while and have just started messing with a Powershell profile script. One thing I wanted was a teal-ish background, so I set the console's background to "DarkCyan".

    $Host.UI.RawUI.BackgroundColor = "DarkCyan"

    Problem is this is the same color that Intellisense will change any string (any input wrapped in single or double quotes) to by default, making it invisible as I type.

    Note: Output colors are fine, I just want to change the foreground color for inputs (interactive console).

    In ISE, I can go to Tools > Options and in the "Colors and Fonts" tab under Console Pane > Console Tokens > String, I can edit the color. This method only affects the ISE console and NOT* the actual shell console. Is there a way to do this (preferably via script)?

    * EDIT

    I have checked the following for methods\properties that might work, but haven't found anything:


    Likewise, I have gone the GUI route within a shell console Right-click the top of window > Properties, but I can't find anything about Intellisense or strings.

    I have searched this forum and the web in general, but haven't found anything regarding to what I am specifically looking for.

  • #78162

    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    The IntelliSense function is provided by the PSReadLine module; you should manage your color settings there (as in, rather than changing the colors in the console app itself. The console doesn't "know" that PSReadLine is running, so it can't mitigate any color problems.

  • #78183

    Points: 1
    Rank: Member

    Correct me if I'm wrong, but PSReadLine requires PS 5+, right?

  • #78189

    Points: 0
    Rank: Member

    Thanks, Don. That is exactly what I was looking for.

The topic ‘Change console's Intellisense Colors’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort