In Powershell, redirection to file can be done with eith >
or out-file
, and from what I read >
is basically a shortcut for the latter. The problem is that, by default, out-file
wraps lines at the width of the screen, so long lines get wrapped pointlessly.
I know I can pass -width
to out-file
to change the length of a line, however this is getting tedious everytime I want to redirect to file, so is it possible to set defaults for out-file
such that I can set the width arbitrarily high, and not have to worry about it again (at least for locally-running scripts on my own box).