It's amazing, isn't it. They went to the effort of building a typed shell but didn't realise there are multiple different types of string.
I bet it still truncates output of the ">" operator to the console width, too.
I bet it still truncates output of the ">" operator to the console width, too.
'troll' * 1000 > out.txt
Open in NotePad++, no weird newlines in the wrong place, content not truncated.Were you using |format-table and |format-list (ft, fl) to explicitly format the text for console viewing, then redirecting that to a file?
'troll' * 1000 > troll.txt
.. works fine as you say Select-String -Path .\troll.txt -Pattern "t" > t.txt
.. wraps the output at the console width. Which means you can't use it as a grep replacement. Select-String -Path .\troll.txt -Pattern "t" | Set-Content t.txt
or
sls 't' .\troll.txt | sc t.txtThis is the main reason I still use cmd.exe