occasional Windows permission error when calling PowerShell from Java - "running scripts disabled"
If you use the command:
Get-ExecutionPolicy -List
You will see there are multiple levels of scopes that can each have their own Execution policy, while I am not sure why your results are so inconsistent, I suspect it may have to do with your CurrentUser policy being undefined. Try running the command
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass