Question

I have a bunch of machines to be joined to a domain. They have same name and hence I am using a VBScript to change the host name of these machines (Win7) and then add them to the domain. The script is present on all the remote target machines and we are trying to run it thorugh psexec from a different machine.

The problem is that PsExec is not able to logon to the target machines. It gives "Access Denied" error. I am using the credentials as... -u "target machine name"\"administrator name" -p Something like this... PsExec.exe \%%a -u "target machine"\"administartor name" -p XXXXXXXXX -s cmd "/C cscript.exe \path\to\script.vbs \reboot"

Please help me understand the issue here. I have tested that PsExec works when the remote target machine is on the same domain. Whats the difference between a workgoup and domain.

Was it helpful?

Solution

folks, i found the answer... PsExec needs the local administrator account on windows to be enabled. Recent Windows(following linux) has made this account default set to disabled(the logic is the same as for 'sudo' in linux: security). Enable this account by the following command(run command prompt as administrator)... net user administrator /enable:yes

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top