Recording the PowerShell console

PowerShell has the ability to save all commands and the output to the console if any from those commands.

By running the command Start-Transcript each time you start PowerShell, you are able to go back and check the commands and the output for troubleshooting purposes.

PowerShell saves everthing in a text file by default in the folder $Home\My Documents\PowerShell_transcript.<time-stamp>.txt

There is also the option to save the output in a specific file and folder by using the optional -path command, for example the command start-transcript -path c:\PowerShell\MyTranscript.txt

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s