Start-Transcript

noun

say it: “START TRAN-skript” /ˈstɑrt ˈtrænˌskrɪpt/

A PowerShell command that records everything a session or script prints, errors included, into a text file until it is stopped.

What does Start-Transcript do?

Start-Transcript is a recorder for the screen: from then on, everything the session or script prints, errors included, is also written to a text file, until Stop-Transcript. A script that runs while nobody watches uses it, so the morning after you can read what it said.

Start-Transcript -Path "$PSScriptRoot\last-run.txt" -UseMinimalHeader | Out-Null
# ... the backup's work ...
Stop-Transcript | Out-Null

In a sentence

  • “Sam put Start-Transcript at the top of the script and Stop-Transcript at the end.”
  • “Start-Transcript kept every word of last night's backup run in last-run.txt.”

Level: Journeyman · More PowerShell terms at this level

Updated