How to execute command on remote windows machine

random832 at fastmail.us random832 at fastmail.us
Tue Sep 3 08:39:18 EDT 2013


On Tue, Sep 3, 2013, at 0:45, gaurangnshah at gmail.com wrote:
> Hi Guys, 
> 
> I have a requirement where i need to kill one process on remote windows
> machine. 
> Following command just works fine if i have to kill process on local
> machine 
> 
> os.system('taskkill /f /im processName.exe')
> 
> However I am not able to figure out how to execute this command on remote
> windows machine. 
> 
> Note: my local machine is also windows (machine from where i have to
> execute command)
> 
> so is there any way i can execute command from windows machine on remote
> windows machine ?

The taskkill command actually has an option for this: /S. I don't know
what mechanism it uses or what you would have to do to give yourself
permission to use it.


-- 
Random832



More information about the Python-list mailing list