1

I'm trying to add a local admin user to about 35 workstations on a AD. I am logged into a domain admin account.

When I run

psexec @wks.txt "net user UserName1 Password1 /add"

I get:

"psexec could not start net user ... on workstation1. The system cannot find the path specified."

All workstations are running Windows 7, mix of 64 and 32 bit.

jscott
  • 24,484
  • 8
  • 79
  • 100
tzvi
  • 15
  • 5

2 Answers2

2

Is there a reason that you're doing this in psexec instead of Group Policy?

A better way would be to use Group Policy Client Side Preferences to add a user to the local administrator group.

MDMarra
  • 100,734
  • 32
  • 197
  • 329
  • 1
    Because I didn't think of it... Not sure exactly how, but I will google it. Thanks! – tzvi May 02 '12 at 19:25
  • It's already been answered here a few times. Try the search feature in the group-policy tag ;) – MDMarra May 02 '12 at 19:47
0

A very common reason for psexec failing on remote computers is antivirus software on the target computer. I set an exception for it so that I can use psexec when necessary. Check the AV logs and even ask the user of that machine if they got an AV alert when you tried to run the command. Of course psexec really isn't the best tool for this particular job, as MDMarra has already stated.

John Gardeniers
  • 27,458
  • 12
  • 55
  • 109