copy output of terminal to a file

Hi everyone, I have a script which when it runs, print out lines in the terminal (with errors). I would like to print out this into a file. I read that I should add this line in my PS1 script: “.myscript.ps1 *> &1 > outfile.log” but it doesnt work because of ampersand character is not allowed.

Anyhelp is welcomed

submitted by /u/jedai47
[link] [comments]

Leave a Reply