Print the Cmdlet Output to a log file as well as display in the Console

I need to Print the Cmdlet Output to the Console and then I wanted the same to be send to it a log file as well.

Like Start-Transcript cmdlet. Is there any way that I can achieve this.

Welcome to the forum. :wave:t4:

Depending on the specific commands you want to observe or log you could use the common parameter -OutVariable to capture the output of a cmdlet and write it to log file later while you’re still able to see the actual output of the cmdlet on the console.

Another option would be to use

Thank you so much for your help