Tuesday, March 15, 2011

Record a PowerShell Session

At PowerShell, you can enter the following cmdlet to record all input and output of the PowerShell session.

1.     Launch PowerShell, enter “Start-Transcript”.

Figure 1: After entering "Start-Transcript"

2.     Enter the following cmdlets:

Import-Module ServerManager

Get-Module –ListAvailable

3.     Enter the following cmdlet to stop recording:

Stop-Transcript

4.     Launch Windows Explorer. Navigate to the above path.

5.     Double-click PowerShell_transcript.xxxx

Figure 2: Result
 
Remark:            You can provide the specific path and file name for the session file by following cmdlet: “Start-Transcript C:\record.txt”.

Reference:

This posting is provided “AS IS” with no warranties, and confers no rights!

No comments:

Post a Comment