I have a Powershell script running some hours. The execution shall be observed in a normal console window. Additionally (no redirect!) I would like to stream the output to a log file. Is there an easy way to do this during starting the *.ps1 script? All suggestions I found tell me how to redirect, but not both for the whole script.
Asked
Active
Viewed 559 times
4
-
Have a look at Start-Transcript: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.host/start-transcript?view=powershell-6 – TobyU Jul 23 '18 at 10:49