My Script contains the command Start-Transcript, which is creating a log file.
If I start the PowerShell.exe and call the Script it is creating the log file correctly.
If I start the script on the ISE, it gives me an error (This Host doens't support Logs/Records):
Start-Transcript : Dieser Host unterstützt keine Aufzeichnungen.
powershell.exe -executionpolicy bypass -file "$(SolutionDir)PSTranscriptTest.ps1"
4> Name Value
My Script contains:
Start-Transcript -Path "C:\transcripts\transcript0.txt" -Force
The Output to Screen works. But not to the file.
The file contains:
Transcript functionality is a function of the hosting application, not the PowerShell engine. For example, it didn't used to work in the ISE, either. That's the problem – whatever VS is doing to run the script isn't supporting the transcript.
Thank you. How can I know, if a functinality is a function of the hosting application or the PowerShell engine?
Can you recommend me an alternative of the start-transcript for simple logging with the PowerShell engine?
You learn those things through experience and by asking questions, as you've done here.
I would probably write my own logging function.
🙂 Thank you.
powershell.exe -executionpolicy bypass -file "$(SolutionDir)PSTranscriptTest.ps1" > RedirectStream.log
You must be logged in to reply to this topic.