Question:
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?
Answer:
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:
1 2 3 4 5 6 7 8 |
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:
1 2 |
Set-ConsoleFont 10 |
You can check 4SysOps for reference.
A few exports are there under kernel32.dll that can change the font also.