Ok, so all of you that use Command Line (CMD.exe), it is probably time to stop and just use PowerShell. Now there is nothing wrong with cmd, as we’ve used it for many, many years. However, there is no transcript option available.
Many of you know and some do not, that PowerShell has a built in recording option. You can run the Start-Transcript cmdlet and record all of your actions.
At any PS cmd prompt, type: Start-Transcript and anything in the screen that appears, either by typing, or as a resultant set, is recorded into a text file in the current active path. To stop the transcript, you guessed it: Stop-Transcript.
Want to control where the transcript log file is saved and what it is name? The syntax is: Start-Transcript –Path c:\temp\transcript.txt –NoClobber
What is the ‘-NoClobber’ switch? If there is already a file in that location named transcript.txt, PowerShell will not allow you to overwrite it.
That’s it in a nutshell. You can record your actions, submit the file for your change advisory board (CAB) or just simply document all of your steps. For additional information with PowerShell, don’t forget to visit the Hey! Scripting Guy! blog. Happy documenting.