Bypass execution policy to gather CPU load

This commit is contained in:
Dirk Baeumer
2017-12-04 21:22:35 +01:00
parent a42cd0efc5
commit 8abfdc5489
+1 -1
View File
@@ -129,7 +129,7 @@ export function listProcesses(rootPid: number): Promise<ProcessItem> {
const execMain = path.basename(process.execPath);
const script = URI.parse(require.toUrl('vs/base/node/ps-win.ps1')).fsPath;
const commandLine = `${script} -ProcessName '${execMain}' -MaxSamples 3`;
const cmd = spawn('powershell.exe', ['-Command', commandLine]);
const cmd = spawn('powershell.exe', ['-ExecutionPolicy', 'Bypass', '-Command', commandLine]);
let stdout = '';
let stderr = '';