avoid line wrap in powershell output

How do I avoid a linewrap in powershell output? Appearently powershell thinks the terminal is of limited size.

I call it like that:

ssh user@winsrv powershell -NonInteractive -NoLogo -File some.ps1

This causes the lines to be wrapped/truncated at 80 chars. Only powershell has this issue, the parent POSIX shell gets it right.

July 30th, 2015 3:31am

You can try setting the bufferwidth using [console]::bufferwidth. Create a profile and set the value to whatever you want. The profile path is generally 

C:\Users\<user>Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1

If it doesn't exist create it and add the [console]::bufferwidth = <whatever> command.

Free Windows Admin Tool Kit Click here and download it now
July 30th, 2015 3:49am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics