Hi,
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.
Start-Transcript d:\Log.txt
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.
Dir
Get-Process
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.
Aman Dhally
Transcripts are a good learning tool. Unfortunately, they aren't supported everywhere. For example, these cmdlets won't work in the ISE. Don't forget to read help for Start-Transcript: you can specify the file name and even append to existing transcripts.
ReplyDeleteHiJeffery,
Deletethanks for the information. :), and thanks for the Comment.
aman