The Set-ExecutionPolicy command of PowerShell is banned, so I can NOT run like this:
PS> .\script.ps1 (enter)
Is there another way to run the PowerShell script except from the “Windows PowerShell ISE”?
PS: I was able to use Java’s ProccessBuilder to run a single PowerShell command, but don’t know how to run the whole script.
This is what we use to run PowerShell scripts from Java (works regardless of the execution policy):