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?
Use the Shift + Ctrl + , (comma) keyboard shortcut to open the settings UI. Click on the profile to change the settings — for example, Windows PowerShell or Command Prompt. Click the Appearance tab. Under the “Text” section, use the “Font face” setting and type the name of the style – for example, Consolas.
To change the font size of the PowerShell ISE editor using the command, we need to use the cmdlet $PSISE which is only loaded inside the PowerShell ISE console. You won't find it in the main PowerShell console. You need to select the Options Property and then need to set its FontSize attribute as shown below.
Is there a way to install new fonts to PowerShell? Just install the Terminal App from the Windows Store (the application is created by Microsoft) and change the appearance using the font you want, no need to modify the Registry.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With