Write-Host => Export to a file

前端 未结 4 1624
孤街浪徒
孤街浪徒 2021-01-08 00:34

I have got a script with some commands such as Write-Host \"Server1\". How can I export it to a file?

When I tried with script > export.txt

4条回答
  •  南方客
    南方客 (楼主)
    2021-01-08 00:46

    Using *> instead of > works for me. It redirects all output to a file; nothing is displayed on the screen.

提交回复
热议问题