Search code examples
unixpowershellloggingconsolewindows-console

script like logging utility for windows


Linux systems provide a nice tool (script) that can log terminal stdout data in a file. It has the following format:

To turn on logging: script [options] [filename]

To turn off logging: exit

I'm looking for an identical utility for windows console and powershell (Or any native windows support for logging the entire session).

Note: Please don't suggest redirection.


Solution

  • I believe you're looking for Start-Transcript.

    Keep in mind: It won't work in the ISE. Don't forget Stop-Transcript at the end of your script!