views:

489

answers:

2

I'm trying to run a psexec command to a remote Windows Server 2003 machine. I run the following command:

psexec \machinename perfmon.msc -u machineadmin -p adminpassword -i -s

The -i and -s flags will allow me to run the GUI for perfmon.msc on the remote machine's desktop interactively.

I get the following error when I try to run the above command:

Couldn't Access machinename Access denied

I'm using psexec version 1.94 and I'm certain that the machinename, user, and password are correct. Does anyone know if there are known issues with psexec on Windows Server 2003 and whether or not there is a fix?

A: 

Are you connecting as an admin to the remote machine? The error says 'access denied'. You may not have the necessary privileges. Try connecting as an admin.

msvcyc
I am connecting as an admin.
cmmacphe
+1  A: 

[This question would be better fit for ServerFault.com, but nevertheless...]

A few suggestions:

  1. Use two slashes before the machinename e.g. \\machinename (maybe that's what you meant the StackOverflow escaped the backslash)
  2. *.MSC files are not usually directly executable remotely--you'll want to give the path to "c:\WINDOWS\system32\mmc.exe" and then the parameters
  3. All parameters for psexec should go before the remote program and its parameters.
  4. Is there really a reason to run the process as the System account ('-s') instead of just Administrator?

All together, it should look something like this:

psexec \\machinename -i -u machineadmin -p adminpassword "c:\WINDOWS\system32\mmc.exe" "perfmon.msc"
ewall

related questions