Skip to content

Powershell logs during the execution #48

@VGBenjamin

Description

@VGBenjamin

Hello,

How could I have the logs of my powershell tasks during the execution? Because for the moment, I am only able to write the result of my execution when the powershell execution is finished and that is an issue for the long running tasks because we have the feeling that nothing happen.

Here is the function I currently use:

const child_process = require('child_process');
const exec = child_process.exec;
function executePS(scriptPath, callback) {
    exec("Powershell.exe  -executionpolicy remotesigned " + scriptPath, function (err, stdout, stderr) {
        console.log(stdout);
        console.log(stderr);
        callback(err);
    });
}

exports.executePS = executePS;

Regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions