PsExec in Domain

We use PsExec as a 3rd tool with our product to remote deploy software's over the network. The command we pass

to PsExec

psexec \\ -u\test -p test -c -f -i -e test.exe

We prepend the user name with the machine when the domain name in not provided. If the domain is provided we just use the domain administrator’s user name for remote deployment.

One of our customer does not wants give domain admin user and pwd.

So as a test fix we remove the machine name from the user name psexec \\ -u test -p test -c -f -i -e


Now the remote deployement fails. Just wanted to know which is the correct option to pass to psexec if the machine is in a domain.

psexec \\ -u\test -p test -c -f -i -e test.exe


psexec \\ -u test -p test -c -f -i -e test.exe


psexec \\\\ -u test -p test -c -f -i -e test.exe
Who is Participating?
So I used in the past the same method for deploying software on the domain. The only problem of course that is the password. If they can not give you the domain password or eventually make a copy for you the only sollution is to use the Local administrator account and password. Usually this will not be the same for all the computers so ... this could be a problem.
You have these possibilities:

psexec \\computername -u domainname\domain_admin -p domain_password -c -f -i -e test.exe  in case you know the domain admin and password


psexec \\computername -u Local_user_with _admin_privileges -p password -c -f -i -e test.exe  in case you know the local administrator password

Maybe you can just change ask to the domanin admin to change all the local admin password using a script and then to give you these passwords.
As a ultimate sollution you could create your bat file with domain admin user and a xxxx as password, then pass it to the domain administrator that could replace all xxxx with his true password and then convert the file from bat to exe (just search with google bat2exe converter). So in this way he will provide you an exe, coded file, that will do everything you want but will not let you see the admin password.

Good luck

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.