How To Permanently Change PowerShell's Configuration?


  1. Posts : 524
    win10
       #1

    How To Permanently Change PowerShell's Configuration?


    My Power Shell got screwed up - the input colours got changed to yellow and I couldn't find a way to change them back... And on my old monitor I can't read the yellow.

    Lots of stuff on the web about it. Recurring problem. Solutions here and there that don't work.

    Finally found something that works but I have to input it every time i start up Power Shell.

    Here it is:

    Code:
     Set-PSReadLineOption -Colors @{
    "Error" = [ConsoleColor]::DarkRed
    "String" = "$([char]0x1b)[38;5;100m"
    "Command" = "#8181f7" }
    Does the job. Input is blue, I'd rather have black but blue will do.

    But how do I put that into Power Shell's configuration so's it stays there?
      My Computer


  2. Posts : 68,995
    64-bit Windows 11 Pro for Workstations
       #2

    Hello,

    If you change the colors of the PowerShell console windows from its properties page like below, does it stick after clicking on OK and reopening PowerShell?

    Customize Colors of Console Window in Windows

    Change Terminal Colors of Console Window in Windows 10

    Change Cursor Color of Console Window in Windows 10
      My Computers


  3. Posts : 524
    win10
    Thread Starter
       #3

    Hi....

    no, they didn't, that was the problem. the given solutions just didn't work. I haven't revisited them since I found the solution I've shown. It could be they'd work now.... they change such things as time goes on, don't they....

    that's what all the forum posts i found were about.... folks who found the given solutions didn't work....

    i'll check them out again some time... are they the only permanent config amendment routes ?

    p.s. it was one of those that got me into it in the first place... I researched changing colours and did as instructed and then found I couldn't get back.... as I remember the only one that wouldn't change back was the input text one...

    why'd I go in the first place? just wanted to change from that awful nowadays trendy black screen to a white one...
      My Computer


  4. Posts : 68,995
    64-bit Windows 11 Pro for Workstations
       #4

    Usually the changes you make to a console window will only get applied to that specific one opened by a specific shortcut.

    Do you remember the exact method you used to change it?

    If you open PowerShell from a different new location or shortcut, does it have the default settings?
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 00:16.
Find Us




Windows 10 Forums