Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to connect to a windows XP/Vista machine using rdesktop from Linux and execute a script on the windows machine. Of course, I will authenticate to the machine from the command line on linux. The -s option in rdesktop is supposed to be able to do this, but it just opens up a normal rdesktop desktop to me. Iam using rdesktop 1.5.0 from Ubuntu. To clarify, I would like to NOT see the remote desktop at all. I just want the command/script executed on Windows. If I need to do this on a remote linux machine, I could have just said

ssh user@host command 

share|improve this question
up vote 2 down vote accepted

Winexe will also allow you to execute a single command/script remotely from a Linux box. Since you are running Ubuntu, you can install it easily by executing:

apt-get install wmi-client

share|improve this answer
Additionally, since you mentioned that you're executing it remotely, this approach would require an established VPN connection. – Jeremy Viet Jul 6 '09 at 8:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.