diff --git a/pkg/shellexec/shellexec.go b/pkg/shellexec/shellexec.go index e5d48346..63a65ce1 100644 --- a/pkg/shellexec/shellexec.go +++ b/pkg/shellexec/shellexec.go @@ -166,7 +166,7 @@ func StartRemoteShellProc(termSize waveobj.TermSize, cmdStr string, cmdOpts Comm } else if remote.IsPowershell(shellPath) { // powershell is weird about quoted path executables and requires an ampersand first shellPath = "& " + shellPath - shellOpts = append(shellOpts, "-NoExit", "-File", homeDir+fmt.Sprintf("/.waveterm/%s/wavepwsh.ps1", shellutil.PwshIntegrationDir)) + shellOpts = append(shellOpts, "-ExecutionPolicy", "Bypass", "-NoExit", "-File", homeDir+fmt.Sprintf("/.waveterm/%s/wavepwsh.ps1", shellutil.PwshIntegrationDir)) } else { if cmdOpts.Login { shellOpts = append(shellOpts, "-l") @@ -276,7 +276,7 @@ func StartShellProc(termSize waveobj.TermSize, cmdStr string, cmdOpts CommandOpt // cant set -l or -i with --rcfile shellOpts = append(shellOpts, "--rcfile", shellutil.GetBashRcFileOverride()) } else if remote.IsPowershell(shellPath) { - shellOpts = append(shellOpts, "-NoExit", "-File", shellutil.GetWavePowershellEnv()) + shellOpts = append(shellOpts, "-ExecutionPolicy", "Bypass", "-NoExit", "-File", shellutil.GetWavePowershellEnv()) } else { if cmdOpts.Login { shellOpts = append(shellOpts, "-l")