An undesirable effect of when a PowerShell script task is run is that a PowerShell-Transcript script log is created when executed on the host.
ITMS 8.x
This is an environmental issue - the files are generated from a configuration on the host which enables transcript files from every PowerShell session:
Which means that this is likely:
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 for this command
For each of these possibilities, these are the steps to check:
1. Execute the command in PowerShell so we 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 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"
For all users:
Invoke-Item "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup"