I have tried to use these to customise my PowerShell console, but they all seem broken. The BackgroundColor goes black, but as soon as I type something like dir everything is in the default blue background again. I've been doing quite a few web searches and cannot find a way to just change this. Do you know a way to change the console so that I can make the BackgroundColor hold?
$Shell = $Host.UI.RawUI
$Shell.BackgroundColor = "Black"
$Shell.ForegroundColor = "White"
$Shell.CursorSize = 10
This page suggests adding these values to $profile to make them stick in the console session, but this does not work. https://4sysops.com/wiki/change-powershell-console-syntax-highlighting-colors-of-psreadline/
Is there some other PSReadLine function (possibly a PS v5.1 option) that does allow permanently fixing the console colors in a session?
* Set-PSReadLineOption options have changed
- To specify colors, use the new `-Color` parameter and pass a Hashtable
https://www.powershellgallery.com/packages/PSReadLine/2.0.0-beta1/Content/Changes.txt
No example on how to change backgroundcolor though...