How to save all output to a file when running PowerShell ISE Script

Dear Friends,

I’m a newbie of PowerShell, my question is that I wanted to run below commands and have all the output generated by them to be saved into one single .txt file. I know that when it’s one command line we can use out-file or export-csv cmdlet, but how about there are more than one commands and all the output needs to be append together in one file?

<p class=“qtext_para”>get-wmiobject win32_computersystem</p>
<p class=“qtext_para”>Get-WmiObject -class win32_processor</p>

Thank you very much!

Have you considered Start-Transcript and Stop-Transcript?

Hi Doug,


Thanks a lot! It works for me! I used:

Start-Transcript “C:\transcript.txt”


By the way, just wanted to know additionally - is it possible to output without the below information like transcript started and transcript end?

Windows PowerShell transcript end
End time: 20201125153722