Powershell 'transcript files' are generated on hosts when a Powershell task is run
search cancel

Powershell 'transcript files' are generated on hosts when a Powershell task is run

book

Article ID: 369561

calendar_today

Updated On:

Products

Client Management Suite IT Management Suite

Issue/Introduction

An undesirable effect of a PowerShell script task running is that PowerShell 'transcript files' are created on the host where it is executed.

Environment

ITMS 8.x

Cause

This is an environmental issue as the 'transcript files' are generated from the Powershell command "Start-Transcript", and when run on a host which enables 'transcript files' from every PowerShell session as documented by Microsoft in the following article:

Start-Transcript

This is likely caused by any of the following scenarios:

1. Configured in the PowerShell Profile
2. Configured in the Group Policy
3. Configured to open PowerShell session with the command on the session start from the Windows Registry
4. Or there is a script in the User's Startup folder using this "Start-Transcript" command

Resolution

For each of these possibilities, these are the steps to check:

  1. Execute the command in PowerShell so you can check the PowerShell Profile:

    • Notepad $PROFILE
    • Check if the contents of $PROFILE  variable contain the command Start-Transcript

  2. If the system is a domain environment, it can be a Group Policy to configure PowerShell logon scripts. This will allow you to run a specific script or command when a user logs in. Contact the Windows administrators to check this.

  3. Open the Registry Editor (regedit):

    • Navigate to HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
    • Check if there is an entry for the PowerShell startup
  4. To open the Startup folder for the current user:

    • Invoke-Item "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup"

NOTE: For all users use: Invoke-Item "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup"

Additional Information

Start-Transcript