How-to: Fix PowerShell window on Surface

By February 12, 2015Microsoft, PowerShell, Surface

There are many reasons to start using PowerShell, and Oneget is just one of them. However and despite shipped from the same company, PowerShell have not been kind of Surface-friendly.

Have you ever tried to open PowerShell on a Surface, or any device with a high resolution on a small screen? Not sure? Chances are you have not, because you would know by then. The PowerShell window shrinks to something so small it is completely unreadable.

What you do, you simply navigate to %windir%\System32\WindowsPowerShell\v1.0\powershell.exe and create a new shortcut to the .exe-file. 

Replace the existing shortcuts with the new one and you’re good to go!

– Watch the demo in this recording (download)

Now, for a time I have struggled to find a workaround and when I did, presented my findings to Jeffrey Snover. In turn, I got a reply from Lee Holmes, one of the outmost senior developers on PowerShell at Microsoft, who replied shortly after:

“When PowerShell first launches, the shortcut uses Lucida Console as its font. If the locale does not appear to support Lucida Console, we switch to the Bitmap font. (As an aside, our list of locales that do not support Lucida Console was wrong, and we have since corrected that too.)

The problem with the Raster font is that not all font sizes is supported – as you can see from the very limited set of options available when you go to change the size of the raster font. So when we were making our API call to switch fonts (i.e.: from Lucida 16pt to Raster (@ equivalent Width x Height), the font switching API did not snap to the “nearest supported” raster size. Instead, it defaulted to the smallest.”

In other words, there is an upcoming fix for the Windows Management Framework. When? TBA.

Thanks Lee!

– Alex

Leave a Reply