简体   繁体   中英

Equivalent of “script” command in Windows Shellscript?

There is script command on GNU/Linux machine which allows to capture all command line activity into a file . This is really helpful tool especially when we learn something new and we want to save the commands and their output for future reference.

I am currently learning the Git on Windows PowerShell terminal and I wanted to capture all the commands and their output in a file for future reference.

Is there any way/command do achieve it on Windows PowerShell?

It exists standard CmdLets : Start-Transcript and Stop-Transcript .

You'll find more informations about these CmdLet in the associeted TechNet documentation .

Try with Start-Transcript and Stop-Transcript cmdlet.

You can also use Start-Transcript for ISE Editor module because these CmdLet don't work natively in ISE .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM