2

We are doing a lot of things in PowerShell in networking and in basic servers and our instructor is having us copy and paste sessions in PowerShell into a .txt file. This is well and fine, but is there a command to print the session? Or make a log?

I know not, he knows not, we know not.

It seemed as if there were a print command, but I may be confusing that with with Write-Host

4

Use the Start-Transcript cmdlet to begin recording a session.

You can optionally specify the path and filename you wish to record to, and whether to append to existing files or overwrite them. If unspecified, a file-name is generated in the folder C:\Users\USER\Documents.

This will record in the text file all typed commands and all output that appeared on the console.

To stop recording use the Stop-Transcript cmdlet. Alternatively, ending a session will also stop the transcript.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.