8

How do I change the font for PowerShell?

There are only a few kind of fonts in PowerShell Preference.

Is there a way to choose more fonts?

3
  • 2
    What do you mean by "change font on PowerShell"? Do you want to change the font used for the PowerShell console? Manually or programmatically? Feb 4, 2017 at 11:02
  • 1
    I want to change font with profile. Feb 4, 2017 at 11:12
  • 2
    I don't think it's possible to do that in a PoSh way for the current process, because it's a setting of the console host (conhost.exe), not the PowerShell host process. Maybe related. Feb 4, 2017 at 11:33

2 Answers 2

4

When you launch Powershell.exe, client server runtime sub-system(csrss.exe) spawns a child process called conhost.exe.

You can try this the harder way to deal with the font:

Set-Location HKCU:\Console
New-Item '.\%SystemRoot%_System32_WindowsPowerShell_v1.0_powershell.exe'
Set-Location '.\%SystemRoot%_System32_WindowsPowerShell_v1.0_powershell.exe'
New-ItemProperty . FaceName -type STRING -value "Lucida Console"
New-ItemProperty . FontFamily -type DWORD -value 0x00000036
New-ItemProperty . FontSize -type DWORD -value 0x000c0000
New-ItemProperty . FontWeight -type DWORD -value 0x00000190

Apart from that, there is a SetConsoleFont module available for PowerShell.

The cmdlet for setting it is:

Set-ConsoleFont 10

You can check 4SysOps for reference.

A few exports are there under kernel32.dll that can change the font also.

2

To change the font in PowerShell:

  1. Right click on the PowerShell icon at the top left of the PowerShell screen
  2. Click Properties
  3. A window appears, showing options for font size, family, colors and more.

Screenshot of PowerShell properties

1
  • Unfortunately, this does not persist between launches Feb 27 at 21:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.