const shell = require('node-powershell');
let ps2 = new shell({
executionPolicy: 'Bypass',
noProfile: true
});
ps2.addCommand('Invoke-Command -ComputerName $machinename -ScriptBlock {node
path of the script $args[0]} -ArgumentList $text -
credential $Cred')
tried accessing in the remote node.js script as follows: var arg=$args[0] console.log(""+arg);
using invoke-command which is node-powershell command,how to pass local variable to a remote nodejs script and access it in that nodejs script
via deepthi cherukuri
No comments:
Post a Comment