Setting Powershell colors with hex values in profile script

前端 未结 5 1460
旧时难觅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:49

    The correct way to do this is with the Registry

    cd hkcu:/console
    $0 = '%systemroot%_system32_windowspowershell_v1.0_powershell.exe'
    ni $0 -f
    sp $0 ColorTable00 0x00562401
    sp $0 ColorTable07 0x00f0edee
    

    With the color being

    0x00BBGGRR
    

提交回复
热议问题