Tuesday, 30 May 2017

Initializing node-powershell variable with nodejs variable

var machinename='xyz';
const shell=require('node-powershell');
let ps=new shell({executionPolicy:'Bypass',
noProfile:true
});
ps.addCommand('Invoke-Command -Computername 
$computername -ScriptBlock{command} -credential $mycred');

need to find way to initialize $computername with machinename which is nodejs variable



via deepthi cherukuri

No comments:

Post a Comment