Execute remote CMD commands in python (PSEXEC)

0

Here is a test where you get the error:

import subprocess


ip = '192.168.15.5'
ipDest = '\\' +ip
subprocess.Popen(['psexec', '/s', ipDest, 'cmd'], shell = True)

Error presenting:

  

'psexec' is not recognized as an internal command   or external, operable program or batch file.

Since the parameters are correct because they normally execute directly in the CMD.

    
asked by anonymous 19.09.2018 / 02:46

0 answers