psexec not getting output on powershell on remote PC -
readpower.ps1 contain following. , able output on output.csv locally.
$port= new-object system.io.ports.serialport com7,19200,none,8,one $port.open() $port.writeline("?p") $port.readline() $machinepower= $port.readline() $date = get-date $texttosend = "machinename,"+ $date +"," +$machinepower $texttosend | out-file output.csv -append -encoding ascii $port.close()
when run remotely, using
psexec \\remotepc -s -u username -p password powershell c:\readfamlaser\readpower.ps1
no output on output.csv did miss out anything?
Comments
Post a Comment