PSexec and Windows 2008 server (access denied)

I have a program that uses psExec to extract environment variables on a remote host. I get the error message: PSEXESVC service failed to start when xxhost Access was accessed.

This command works for Windows 2003 servers, but not 2008 (it works in 2008 if I run CMD as another user): psexec \ xxhost -u xxdomain \ xxuser -p xxpasswrd-h cmd / c echo %% JAVA_HOME ^% %

I also tried creating a connection before running psexec (with NET USE) - above, this works in 2003, but not in 2008: NET USE \ XXhost psexec \ host cmd / c echo %% JAVA_HOME ^ %%

The problem is that I cannot use RUNAS in batch files as it asks for a password. So, does anyone know a workaround without having to make changes on the remote server?

+4
source share
1 answer

It took me several hours to find the working path to PsExec between two Windows 7 computers with a non-administrator user, starting with PsExec ... Disabling UAC (EnableLUA = 0, ConsentPromptBehaviorAdmin = 0, LocalAccountTokenFilterPolicy = 1) did not work, turning off Firewalls did not work worked ...

- JelmerS: ( https://serverfault.com/questions/489822/psexec-is-not-connecting-to-machine-using-supplied-username-and-password/489845)

, psexec - ADMIN $share . psexec:

cmdkey.exe /add:MACHINE_NAME_HERE /user:MACHINE_NAME_HERE\Administrator /pass:PASSWORD_HERE 
psexec.exe \\MACHINE_NAME_HERE -i notepad
cmdkey.exe /delete:MACHINE_NAME_HERE
+14

All Articles