Record your PowerShell session

By |2017-12-08T14:44:41+00:00August 10th, 2011|PowerShell|0 Comments

There is a quick way to record your session in PowerShell to a text file so you have a record of every command you have typed.

In PowerShell run the following command (Change location to wherever you would like)

Start-Transcript c:Powershell.txt –Append

Now use PowerShell as you usually would, once you have finished with PowerShell run the following command “Stop-Transcript”

If you now open the “PowerShell.txt” you will see everything you have just done in your PowerShell session.

Windows PowerShell Transcript Start
Start time: 20110810173323
Username  : Test
Machine      : Test (Microsoft Windows NT 6.1.7600.0)
Transcript started, output file is c:MySession.txt
[PS] C:>Get-Mailbox –Identity Dan

Name                     Alias                ServerName
—-                         —–                 ———-
Dan                        Dan                  Test

[PS] C:>Get-User -Identity risual

Name               RecipientType
—-                   ————-
Dan                  UserMailbox

[PS] C:>Stop-Transcript

Leave A Comment

like what you see? 

Sign-up to our newsletter and never miss out on the latest blogs, events and tech news from the world of risual
Give it a try, you can unsubscribe anytime.