Psexec copy file question


I'm trying to run NLTest on workstations remotely via psexec, only NLTest is not installed on workstations. Instead of manually copying it I wanted to copy it using the -c in psexec and then run the command but so far it doesn't work for me.

psexec -c nltest.exe C:\WINDOWS\System32 \\RemoteIP cmd /k nltest /dsgetsite

This exits psexec every time. I swaped -c to the end and some other changes with no luck.

Any ideas?
Who is Participating?
pony10usConnect With a Mentor Commented:

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

psexec \\marklap -c test.exe

QlemoConnect With a Mentor Batchelor and DeveloperCommented:
The -c has no parameter, it is used as a simple switch indicating the program to start needs to be copied first. The correct usage is hence

psexec  \\RemoteIP -c nltest.exe /dsgetsite
snyderkvAuthor Commented:
Ah I see. Thanks both of you
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.