diff --git a/agent/agent_windows.go b/agent/agent_windows.go index fd6fb19..50bd5f0 100644 --- a/agent/agent_windows.go +++ b/agent/agent_windows.go @@ -143,7 +143,7 @@ func (a *Agent) RunScript(code string, shell string, args []string, timeout int, switch shell { case "powershell": exe = getPowershellExe() - cmdArgs = []string{"-NonInteractive", "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", tmpfn.Name()} + cmdArgs = []string{"-NonInteractive", "-NoProfile", "-ExecutionPolicy", "Bypass", tmpfn.Name()} case "python": exe = a.PyBin cmdArgs = []string{tmpfn.Name()}