I keep getting this error randomly when running some simple powershell scripts I have, for games. Sometimes when I get this error I open and close Windows Terminal and then the script works. Sometimes I just retry and it works. Does anybody know why. I’m on windows 11.
I think the problem is related to windows terminal, more specifically to the “When terminal starts” startup settings which I have set to “Open windows from a previous session”. IIRC if I disable that setting it works correctly. Of course I would like to keep that setting. Any ideas?
