Posts
49
Comments
83
Trackbacks
0
How to record your shell session

PS> Start-Transcript
PS> # do a bunch of stuff
PS> Stop-Transcript # or just quit the shell

This will create a file (by default in your My Documents folder) that is a verbatim copy of your shell session. No more copy and paste needed from the shell to notepad! A few other things of note:

  • This is the only way to capture verbose and warning information as those cannot be redirected from the shell like errors can (don't ask me why, but make sure to tell Jeffrey Snover about this)
  • You can start a transcript by default every time you start your shell by putting 'start-transcript' in your profile.ps1 file
  • There can change the location of the text file that is created. Look at get-help start-transcript for more details
Have fun! 
posted on Sunday, October 22, 2006 11:10 AM Print
Comments
No comments posted yet.

Post Comment

Title *
Name *
Email
Url
Comment *  
Please add 3 and 6 and type the answer here:
News
A little slow these days as I'm busy working on exchangelabs.com. I will try and post tidbits when I get some time. Enjoy the older posts till then!