4

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.

1

1 Answer 1

7

Tee-Object is the function You are looking for.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.