PsExec in Domain

Posted on 2005-05-12
Last Modified: 2008-03-10
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
Question by:prem_kumar79
    1 Comment
    LVL 5

    Accepted Solution

    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


    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Don’t let your business fall victim to the coming apocalypse – use our Survival Guide for the Fax Apocalypse to identify the risks and signs of zombie fax activities at your business.
    ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
    After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now