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

This command copies the program test.exe to the remote system and executes it interactively:

psexec \\marklap -c test.exe

However I need to pass some arguments to the text.exe program.

This doesn't work:

psexec \\marklap -c "test.exe /S"
share|improve this question

I figured it out. You need to quote the .exe part and then just put the arguments for it after it:

psexec \\marklap -c "test.exe" /S
share|improve this answer
Otherwise PsExec thinks it's one file name with spaces in it, which makes sense after some thought. Good catch! – Jeff McJunkin Aug 13 '10 at 15:30
Excellent, thank you!! – realtek Dec 12 '14 at 16:02

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.