10

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?

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.

| improve this answer | |
  • 3
    This 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 Nov 22 '12 at 12:38
  • Worked for me in Windows 8. Ran PowerShell as administrator, change font, close; next time run as normal user, new font is happy. – Daryn Dec 9 '14 at 18:57
  • What didn't work though, even as admin, was edit the default font. You have to go to Properties->Font. – Andreas Haferburg Dec 28 '18 at 11:40
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.

| improve this answer | |
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.

| improve this answer | |
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.

| improve this answer | |
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.

| improve this answer | |

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.