Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2049
  • Last Modified:

Error code zero in PSexec

Hi

I am trying to use PSEXEC utility , when i am trying to run the command , it finishes with error code 0
Here is how is run
psexec \\<REMOTE ip>  -U <USERNAME> -p<PASSWORD>  COMMAND
is my syntax wrong
Also do i need admin priviliges on the  remote computer to run this ?
And one of user accounts on the remote computer is IT Dept , will PSEXEC accept usernames with spaces ?

Please advice

Thanks
Binesh


0
bineshb
Asked:
bineshb
  • 4
1 Solution
 
Alan_WhiteCommented:
Error code 0 from psexec means it has completed sucessfully.
I was confused by this when I started using it too.
If you ask it to run cmd.exe on the remote system you will see that the 0 gets generated when you exit, everything you type while in the CMD shell will work.
 
As for the space in the user id, I dont think psexec will like it.  What you probably have is the display name of the account, there should be a pre-windows 2000 account name for that account too.
 
0
 
Alan_WhiteCommented:
Sorry, just tested it WILL accept spaces in the username.  I set up a local account on a remote server called IT Dept (and I was wrong about the pre windows 2000 name) and was able to connect using that with psexec.
 
0
 
bineshbAuthor Commented:
Alan it seems not to work , also what i find strange is  commands run on the remote computer is not running via psexec . These commands are for a particular application , should i add some parementers ?
0
 
Alan_WhiteCommented:
The format of the command that I normally use is:
 

PSEXEC \\servername command -U user id -P password

Open in new window

0
 
Alan_WhiteCommented:
Also, a wealth of information here:
http://forum.sysinternals.com/forum_topics.asp?FID=8
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now