PowerTip: Create a Record of Your PowerShell Commands

PowerTip: Create a Record of Your PowerShell Commands

  • Comments 1
  • Likes

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:

Start-transcript

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:

Stop-transcript

 

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • What if I want to have a log of commands in Powershell ISE where apparently Start-Transcript doesn't work?