Powershell WindowSize Error

avatar

I don't know how this isn't already out here or if the search function just didn't find the exact phrase in the error message, but can anyone tell me how to get rid of this? The error in the message (for future searchability) is:


Resize PowerShell buffer and window size
Exception setting "WindowSize": "Window cannot be wider than the screen buffer.
Parameter name: value.Width
Actual value was 191."
At line:3 char:1
+ $Host.UI.RawUI.WindowSize = $Host.UI.RawUI.MaxWindowSize;
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], SetValueInvocationException
+ FullyQualifiedErrorId : ExceptionWhenSetting

Exception setting "WindowSize": "Window cannot be wider than the screen buffer.
Parameter name: value.Width
Actual value was 192."
At line:4 char:1
+ $Host.UI.RawUI.WindowSize = new-object System.Management.Automation.H ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: '(':) [], SetValueInvocationException
+ FullyQualifiedErrorId : ExceptionWhenSetting

2016-11-22_6-20-28.png

All Comments (1)

avatar

Hi,

You can change the buffer and window size in the options under Types->Others.

In the PowerShell section, you could try to change the rows and cols of the window size.

For your information, if you put -1 in the rows or cols of the Windows Size. $Host.UI.RawUI.MaxWindowSize is used to set the Windows Size.

Best regards,

Olivier Désalliers