up vote 3 down vote favorite
share [g+] share [fb]

In Windows 7, how can I set the default PowerShell window size? By default it comes up too tall for the netbook screen I am working with.

I have tried the usual way of changing the size—by clicking in the upper-left corner and choosing “Properties”—but it tells me: Unable to modify the shortcut: . Check to make sure it has not been deleted or renamed. (yes, there is a dot in the middle of the error message)

I also tried right-clicking on the PowerShell shortcut in the Start menu and changing properties there, however, the changes don’t seem to stick.

link|improve this question

Also see superuser.com/questions/36074/… – Kristopher Johnson Mar 26 '10 at 19:51
feedback

3 Answers

up vote 1 down vote accepted

Use a function like this in your profile

Function Set-WindowSize { Param([int]$x=$host.ui.rawui.windowsize.width, [int]$y=$host.ui.rawui.windowsize.heigth)

$size=New-Object System.Management.Automation.Host.Size($x,$y)
$host.ui.rawui.WindowSize=$size

}

Then call the function:

Set-WindowSize 100 50

link|improve this answer
Thanks. This works, as long as I Set-ExecutionPolicy unrestricted, which is a little worrisome, but I guess I would have to do it eventually to get anything done under PowerShell. – Nate Nov 9 '09 at 17:46
feedback

Another approach is to run Powershell as an administrator. See http://superuser.com/questions/36074/how-do-i-modify-the-powershell-console-settings-in-windows-7

link|improve this answer
feedback

You could try Properties, Layout tab, Window Size.

I was also able to grap the top RIGHT most window and re-size in the traditional Windows way.

You could try launching the GUI alternative: PowerShell ISE.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.