Setting Powershell colors with hex values in profile script

前端 未结 5 1419
旧时难觅i
旧时难觅i 2021-01-11 17:09

I know I can change PowerShell console colors by setting in my profile something like:

$Host.UI.RawUI.BackgroundColor = \"White\"
Clear-Host
<
5条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-11 17:29

    You can, but not via the $Host object. The color table is stored in the registry.

    You would use the same names, but the colors would be different. That's why the default PowerShell console is blue/gray.

提交回复
热议问题