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.
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.
Gokul,
Welcome to the forum.
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