Start-Transcript
Use Start-Transcript to begin recording the session, both commands and their output, to a text file.
Documentation: Microsoft Learn — PowerShell module reference
Syntax
See the command anatomy
Read the command and its supplied arguments. This example requires real PowerShell or its module; this diagram does not execute it.
Start-Transcript [[-Path] <string>] [-Append] [-Force] [-NoClobber] [-IncludeInvocationHeader] [<CommonParameters>]- Stage 1Start-Transcript
-Path -Append -Force -NoClobber -IncludeInvocationHeader
Try it
PowerShell example · browser support is limited.
Execution scope: The full example below requires PowerShell outside this browser. You can edit this runner to use the supported practice commands; unsupported syntax returns an explanation.
Follow the objects
Run the command to inspect each stage.
Examples
Start-Transcript -Format 'yyyyMMdd-HHmmss'
Show reference output
Sample output · fictional data, shaped like the real thing
C:\Temp\run-20260910-234712.log
Start-Transcript -Format 'yyyyMMdd-HHmmss' (2)
Show reference output
Sample output · fictional data, shaped like the real thing
Transcript started, output file is C:\Temp\PowerShell_transcript.20260910.txt
Start-Transcript -Format 'yyyyMMdd-HHmmss' (3)
Show reference output
Sample output · fictional data, shaped like the real thing
Transcript started, output file is C:\Temp\run-20260910-234712.log Transcript stopped, output file is C:\Temp\run-20260910-234712.log
Parameters
Parameter definitions:
-Path-Append-Force-NoClobber-IncludeInvocationHeader
Practical use and troubleshooting
Practical scenario: Use Start-Transcript when you need to begin recording the session, both commands and their output, to a text file. Start with one identified target and inspect the returned values before extending the operation to a list. Keep the identity in your report so you can trace each result back to the object or path that produced it.
Common error and fix: An unwritable destination prevents transcript creation. Check the directory and account permissions and choose a protected logging location that does not expose sensitive command text. In an unattended script, capture this failure with its original error record and record which target failed. An empty result and an unsuccessful query must remain distinguishable in the final report.
See also: Stop-Transcript. Start-Transcript begins a session transcript; Stop-Transcript ends it. A transcript is a useful diagnostic record but not a structured substitute for the objects returned by a function. Read the linked command before substituting it; similar names do not imply identical inputs or output.
Recap
Start-Transcript Use Start-Transcript to begin recording the session, both commands and their output, to a text file.
Next: Stop-Transcript