These days i am very busy in some other projects so that's why this months i post only few articles. Sorry for that.
Does anytime you think to save all the commands and there output in to text file? it like storing all of the PowerShell Consoles session data.
If yes and you don't know how to do it , let me explain it.
it is very simple. we just need to use two commands these are: Start-Transcript , Stop-Transcript
Let see how to use it.
Open you Powershell console , and before running or doing anything else , type Start-Transcript and the path to txt file in which you want to save all the output.
You can notice in below screenshot it is showing that Transcript started and it the output file is D:\Log.txt.
Now lets run Few Cmdlets.
one wrong command for testing error
All done now, type Stop-Transcript, cmdlet to stop recording the session. Transcript is stopped and now lets open the Log.txt file and see if that store all the things which we have done in our PowerShell console session.
You can see in below screenshot that everything which we have done is saved in to a text file. :)
Thanks for viewing my blog.