Mar 14

Powershell Tips of the week #1 – Cmdlet Start-Transcript

This week I will show you how to use the Start-Transcript cmdlet. Start-Transcript will allow you to record your powershell session in a text file. The transcript includes all command that the user types and all output that appears on the console.

Here is some example on how to use Start-Transcript:

This command starts a transcript in the default file location.


This command starts a transcript in C:\Transcript.txt

Start-Transcript -path "C:\Transcript.txt"

This command starts a transcript in C:\Transcript.txt only if the file doesn’t exist (will not overwrite)

Start-Transcript -path "C:\Transcript.txt" -NoClobber

Other available options:

-Append: Adds the new transcript to the end of an existing file. Use the Path parameter to specify the file.

-Force: Allows the cmdlet to append the transcript to an existing read-only file. When used on a read-only file, the cmdlet changes the file permission to read-write. Even using the Force parameter, the cmdlet cannot override security restrictions.

-Confirm: Prompts you for confirmation before executing the command.

EDIT: I forgot to mention that you could stop the transcript anytime with Stop-Transcript

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>