1

I have recently bought a Lenovo Yoga 3 ultrabook which has a screen resolution of 3200 x 1800.

My cmd window and Powershell window are tiny at this resolution. I have changed the size of the normal cmd window using the Defaults context menu item (which appears when you click the top left corner of the cmd window). I also changed the font and this made an acceptable window/font size.

However, the Powershell window initially opens at the new size then shrinks to the size you can see in the screen shot PS screenshot imgur

How can I rectify this? Thanks.

3
  • are you making your changes on the shortcut properties, or in the title bar -> defaults dialog? if you compare the two, do they match? Jan 17, 2015 at 3:14
  • @Frank I made the changes in the Defaults dialog. They don't match. When I changed the Properties (item under the Defaults menu item), an error message displayed "Unable to change Shortcut". Then, when I clicked OK, the window grew to the values I set. But they weren't retained when I closed and re-opened the powershell window. Jan 18, 2015 at 11:09
  • You might like to use ConEmu instead. It is much better than the standard console.
    – dangph
    Jan 19, 2015 at 5:24

1 Answer 1

0

I have changed the size of the normal cmd window using the Defaults context menu item (which appears when you click the top left corner of the cmd window). I also changed the font and this made an acceptable window/font size.

However, the Powershell window initially opens at the new size then shrinks to the size you can see in the screen shot

Change the settings and default settings with admin rights. I would prefer the font consolas, i had some trouble with lucida console.

And you can change the size in your profile, see variable $profile

if ($host.Name -eq 'ConsoleHost')
{
    $neededWidth = 210

    $pswindow = (Get-Host).UI.RawUI

    if ($pswindow.WindowSize.Width -ge $neededWidth -and $pswindow.BufferSize.Width -ge $neededWidth)
    {
        Exit 1
    }

    $bufferSizeTemp = $pswindow.BufferSize
    $bufferSizeTemp.Width =  $neededWidth

    $pswindow.BufferSize = $bufferSizeTemp

    $windowsSizeTemp = $pswindow.WindowSize
    $windowsSizeTemp.Width =  $neededWidth

    $pswindow.WindowSize = $windowsSizeTemp
}
1
  • Your script has conflicting code. You set two variables twice to in theory what could be entirely different values.
    – Ramhound
    Mar 12, 2015 at 17:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .