python - how to execute commands on remote machine using pysphere -


have vmware vm on wanted execute commands example shutdown /r or dir /o:d etc... remote machine. using module pysphere module communicating vm.

i tried start_process creating process cmd.exe code creating process vm_object.start_process('cmd.exe', args=["shutdown /r"])

when run command cmd.exe need add /c:

cmd.exe /c shutdown /r 

as explained here, need tell cmd.exe run parameter passed string. command running cmd.exe without issuing command passed parameter. /c flag instructs cmd.exe execute parameter passed.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -