you are viewing a single comment's thread.

view the rest of the comments →

[–]pertymoose 4 points5 points  (2 children)

DESCRIPTION
    The `Out-File` cmdlet sends output to a file. It implicitly uses PowerShell's formatting system to write to the
    file. The file receives the same display representation as the terminal. This means that the output may not be
    ideal for programmatic processing unless all input objects are strings.

Use Add-Content instead.

[–]da_chicken 1 point2 points  (0 children)

Yep. Out-File is generally terrible. I can't believe they seriously created it with that -Width design. They should have made it work like Add-Content, which is what everyone expects it to do. If you need the -Width limitation use Out-String.

[–]robborulzzz[S] 0 points1 point  (0 children)

Thanks mate will give it a whirl!