0

I followed tutorial to do so :

in wsb:

<LogonCommand>
  <Command>powershell -executionpolicy unrestricted -command "start powershell {-noexit -file C:\scripts\start.ps1}"</Command>
</LogonCommand>

in start.ps1 :

Set-ExecutionPolicy Unrestricted -Force
Set-ExecutionPolicy -scope CurrentUser Unrestricted

but when I try to run a script in sandbox, it still complains script is not executable.

user310291
  • 36,946
  • 82
  • 271
  • 487
  • This command works for me. Can you show your whole .wsb file? Maybe you have incorrect `` entry. Linked: https://stackoverflow.com/q/64795150/7571258 – zett42 Aug 06 '22 at 17:00

0 Answers0