August 19th, 2012

PowerTip: Create a Transcript of Commands in PowerShell

Doctor Scripto
Scripter

Summary: Learn how to create a transcript of all commands and associated output from within Windows PowerShell.

Hey, Scripting Guy! QuestionHow can I create an audit file of all commands typed during a Windows PowerShell session?

Hey, Scripting Guy! Answer Use the Start-Transcript command:

Start-transcript

Hey, Scripting Guy! Question But I tried to use Start-Transcript in the Windows PowerShell ISE and it did not work. I even tried this in Windows PowerShell 3.0, and still a no go. Am I doing something wrong?

Hey, Scripting Guy! Answer No you are not doing something wrong. The Windows PowerShell ISE does not support transcription. You can implement your own function to simulate transcription. An example appears in this Hey, Scripting Guy! Blog post, Create a Transcript of Commands from the Windows PowerShell ISE.

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.