How can I set the PowerShell default window size in Windows 7?

Nate

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.

Jeffery Hicks

Use a function like this in your profile (notepad $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

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to set a specific window size and placement for all windows that open to default

How do I set the default window size in vim?

How do I set the default size of a new window in WPF?

How to set the default font size in Windows 7 without scaling the rest?

How can I restore default window size in KVM/QEMU

How can I set the BrowserComponent Browser Window Size in Codenameone

Can the default size of Windows 7's "drag to the left or right to resize window" feature be changed?

VIM: how to get current window size, so that I can set NEEDTree to 1/3 window size?

How do I set the default CJK font on Windows 7?

Can I set a default Window size in OSX or snap to notification pane? (Because of broken screen)

How can I change the default Powershell host to new Windows Terminal?

Can I set a style conditional on window size?

Can I set a default title for a tmux window?

How can I widen the Windows 7 Command Prompt window?

How can I increase the size of the pinned jump list in Windows 7?

Restoring window text size to default in Windows 7 x64

How to I set the default startup window size for an X11 application (such as xmgrace)

How do I set the Putty Window size to open bigger than the default?

How can I set Windows 7 up to use three monitors?

How can I set up the python environment variable on Windows 7?

How to set default dbpath for mongoDB in windows 7?

How to set default browser window size in Protractor/WebdriverJS

How can I detect window size with jQuery?

How can I increase the size of my window?

How do I set "all windows" by default when left clicking on a application that has more than one window?

How can I deselect a default printer in Windows 7 and get back to no printer selected as default?

How I can change the default size of the ChoiceBox?

How do you change the default window size of windows-curses?

How can I set 'absolute' or 'fixed' with width: 100% to its parent div not the window size?