As of RS5, why does Clear-Host now reset the window to the default colors?
If I have the following in my profile:
$Host.UI-RawUI.BackGroundColor = 'DarkRed'
Then I issue a Clear-Host
The Background color is reset to the window default.
Prior to RS5, the background color would remain Dark Red.
I use this to determine if I'm in a shell with administrative permissions and then change the background color accordingly. However, with RS5 this is broken (note, my script has not changed)
Background color should be Dark Red
Background color reverts to the default color defined in the Window settings
Name Value
---- -----
PSVersion 5.1.17754.1
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17754.1
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
@W0GER The repo is only for Power Core. For Windows PowerShell please report to UserVoice site or use Feedback tool in Windows 10 Preview builds.
Can you reproduce the issue with PowerShell Core latest build?
This does not reproduce in PS Core 6.1 RC1. Host retains red background color, and executing Clear-Host causes the entire background to be filled with the newly selected color.
Name Value
---- -----
PSVersion 6.1.0-rc.1
PSEdition Core
GitCommitId 6.1.0-rc.1
OS Microsoft Windows 10.0.17134
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
I can reproduce in RS5 with PS Core 6.1. It doesn't seem to be related to Clear-Host though see the following:

If I remove PSReadLine, then the background stays, so this seems to be a PSReadLine bug.