PowerTip: Create a Record of Your PowerShell Commands

Summary: Use Start-Transcript to create a record of Windows PowerShell commands.

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

Hey, Scripting Guy! AnswerUse the Start-Transcript command:


Hey, Scripting Guy! QuestionHow can I provide a custom name and location for my Windows PowerShell transcript? 

Hey, Scripting Guy! AnswerUse the Start-Transcript command with the Path parameter:

Start-transcript -Path c:\fso\mytranscript.txt

Hey, Scripting Guy! QuestionHow can I stop a transcript after I have started it?

Hey, Scripting Guy! AnswerUse the Stop-Transcript command:



Comments (1)

  1. Gyz says:

    What if I want to have a log of commands in Powershell ISE where apparently Start-Transcript doesn't work?

Skip to main content