1

As you can see the image below on the left shows what my PowerShell 7.2.2 looks like and the image on its right shows what my PowerShell 5.1 looks like.

enter image description here

I want to brighten the colors of my PowerShell 7.2.2 so that it would look exactly like my PowerShell 5.1 but I can't seem to think of how. I've tried going to settings but there is no such option. Therefore, I would greatly appreciate it if someone could tell me how.

Thanks in advance.

6
  • What research have you done and what have you tried? Apr 22, 2022 at 4:39
  • @music2myear I've gone to the settings folder and inspected plenty files but couldn't find the one that allows me to manipulate PowerShell colors. Apr 23, 2022 at 7:32
  • Did you research online whether you can manipulate colors in the default PS terminal? There are several terminals that support PS just fine that do offer theming. Apr 24, 2022 at 3:30
  • @music2myear Yes, ofcourse. But I'm not looking for other terminals, otherwise I would just use the Windows Terminal which offers theming. I'm here asking this question because I'm curious and I'm wondering whether the PowerShell 7.2.2 terminal could be configured to look exactly like the PowerShell 5.1 terminal. Apr 24, 2022 at 14:40
  • You say you went to Settings, but did you go to Properties? Also, you still haven't answered if you did any research. Because I searched a basic query about changing PowerShell terminal colors and found solutions right away. Apr 25, 2022 at 3:16

1 Answer 1

0

Change the values outputted by the commands shown below:

enter image description here

by entering commands $host.PrivateData.[element name] = "[color code/name]", $PSStyle.[element name] = "[color code/name]" and Set-PSReadLineOption -Colors @{ "[element name]"="[color code/name]"} respectively.

For more about the above commands, see:

  1. About $host.PrivateData: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-host?view=powershell-7.2#example-8-set-the-background-color-for-error-messages
  2. About $PSStyle: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_ansi_terminals?view=powershell-7.2#psstyle
  3. About Set-PSReadLineOption: https://docs.microsoft.com/en-us/powershell/module/psreadline/set-psreadlineoption?view=powershell-7.2
2
  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Apr 27, 2022 at 6:35
  • Noted & updated. Apr 27, 2022 at 21:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .