The Start-Transcript cmdlet creates a record of all or part of a Windows PowerShell session to a text file. The transcript includes all command that the user types and all output that appears on the console.

Starting in Windows PowerShell 5.0, Start-Transcript includes the host name in the generated file name of all transcripts. This is especially useful when your enterprise’s logging is centralized. Files that are created by the Start-Transcript cmdlet include random characters in names to prevent potential overwrites or duplication when two or more transcripts are started simultaneously. This also prevents unauthorized discovery of transcripts that are stored in a centralized file share. Additionally in Windows PowerShell 5.0, the Start-Transcript cmdlet works in Windows PowerShell ISE.

Run the below commend to start the Transript in the Powershell

Start-Transcript

$FormatEnumerationLimit=-1

Get-HostedConnectionFilterPolicy | fl

11

Run the below command to stop the  Transript in the Powershell

Stop-Transcript 

You can open the Output file form the location mentioned in the powershell and see all the commands are captured..

#powershell

Leave a comment

Your email address will not be published. Required fields are marked *