Apparently running powershell when having set powershell at unrestricted mode with the command
Set-ExecutionPolicy Unrestricted
Wasn’t enough
So I set it at an even more unrestricted mode by putting in
Set-ExecutionPolicy Bypass
and then it worked like a charm. Though it does mean that malicous software can exploit the powershell program.