0
So i wrote a small VB Program, which runs a powershell script.
I know that my ExecutionPolicy has to be set on RemoteSigned or Unrestricted in order to execute scripts on my Computer.
So that's what i did, but it keeps on saying
... cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at .. bla bla
Normally this problem is solved by changing the ExecutionPolicy, but not this time. Maybe because i call powershell out of an EXE? Idk.
Some advise?
ah sure, i forgot to mention, sry for that. I also tried bypass and this kind of stuff. – arvenyon – 2017-12-14T10:26:53.473
Did you also try to permanently allow scripts for your user by running (once)
Set-Executionpolicy -Scope CurrentUser -ExecutionPolicy Bypass
? – hanjo – 2017-12-14T10:30:50.653I did, not helping tho. But I just found the solution by accident... I opened the powershell.exe directly from directory with admin rights, and then loaded the
PSReadLine Module
manually. This helped me out and everything works now perfeclty. But thank you anyway for your help! – arvenyon – 2017-12-14T10:41:47.627@arvenyon Post and accept your solution once you're able to. – root – 2017-12-14T21:00:50.627