How do I set the PowerShell default font to Consolas?

10

1

I would like to have the Consolas font set as default for PowerShell on Windows 7, no matter how I launch it.

I've found very few explanations on the web for doing this, and none were really clear to me.

Well, according to this question, PowerShell is started by a shortcut which normal user can't modify (it was my case).

I right-clicked the shortcut, then clicked on its "font" tab. That time, when trying to change the font, I got the "access reserved to administrator" dialog, allowing me to change the shortcut.

Unfortunately, it wasn't enough, as a subsequent launch reverted to the default font.

Is there another method of setting a default font?

Riduidel

Posted 2011-10-12T07:48:16.857

Reputation: 1 467

Answers

7

Well, according to this question, PowerShell is started by a shortcut which a normal user can't modify (it was my case).

I right-clicked the shortcut, started PowerShell as administrator, and then changed the font. Afterwards, the Consolas font was effectively set as the default.

Riduidel

Posted 2011-10-12T07:48:16.857

Reputation: 1 467

Worked for me in Windows 8. Ran PowerShell as administrator, change font, close; next time run as normal user, new font is happy. – Daryn – 2014-12-09T18:57:37.350

What didn't work though, even as admin, was edit the default font. You have to go to Properties->Font. – Andreas Haferburg – 2018-12-28T11:40:03.213

2This works for Windows 7. For Windows 8 the console starts up with the font you've chosen, then flicks back to the nasty raster font. :( – Greg Woods – 2012-11-22T12:38:19.167

5

Practical tips (I've written some of them because it depends on how you launch PowerShell):

  1. If PowerShell is being launched by the Start → Run command, you may be able to edit the HKCU\Console\xxx key, where xxx is something like %systemroot%...powershell.exe. Just rename the key and test.

  2. If PowerShell is being launched by a shortcut (like when you pin an item to taskbar, or in Start Screen (Windows 8), you must edit the shortcut. To inherit default configuration, I'd recommend you to create another one, log in as administrator, move it to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\System Tools folder, delete the original shortcut, and rename yours. Then open it and pin into your taskbar if you want.

  3. If you don't have write access to the folder above, just create the shortcut in Desktop, for instance, and pin it. The effect is almost the same.

Vinicius Xavier

Posted 2011-10-12T07:48:16.857

Reputation: 151

2

With PowerShell.exe Microsoft did not allow setting the font type through commands, otherwise you could add this to your profile. All you can do is what @surfasb mentioned by setting it through the window properties. If you are working with the ISE though, there are options to set the font by looking at $psISE.Options.

user94184

Posted 2011-10-12T07:48:16.857

Reputation:

2

You can change the default font to Consolas (though sadly not to Lucida Console), but you'll need to get an administrator to change the permissions on the shortcut first to give users the right to modify the shortcut.

Mark Wilson

Posted 2011-10-12T07:48:16.857

Reputation: 43

1

Taking a hint from an earlier @Grawity comment, you'll notice when you open up Powershell that the window options (Ctrl Alt Space ) that the options are similar to the Console window.

So click on default and you can change the options.

surfasb

Posted 2011-10-12T07:48:16.857

Reputation: 21 453