It seems that the script should either try to stop a previous transcript befor starting a new one, or even better, have a finally block that would stop the transcript when the script exits, even if it fails.
I am running the following version of pwershell in a freshly installed Windows 11:
If the script failed, and the script is run again, then it throws the following error:
It seems that the script should either try to stop a previous transcript befor starting a new one, or even better, have a finally block that would stop the transcript when the script exits, even if it fails.
I am running the following version of pwershell in a freshly installed Windows 11: