Why does PowerShell redirection >> change the formatting of the text content?

后端 未结 3 1909
情话喂你
情话喂你 2021-01-06 04:22

I want to use the redirect append >> or write > to write to a txt file, but when I do, I receive a weird format "\\x00a\\x00p..

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-06 05:12

    >> and > redirects console output. So i assume that would also include some weird characters sometimes. >> and > are more closely related to the Out-File cmdlet.

    add-content does not forward console output to a file, It only writes the values you provide it (e.g. a variable or pipeline object)

    about_redirection

提交回复
热议问题