Here's my scenario:
I'm attempting to remotely start & stop IIS 7.0 sites on my server from my local machine, using PsExec.
Some important points:
- Local machine runs Windows Vista.
- Server runs Windows 2008 R2.
- Each machine runs on different domains.
- There is a one-way trust from my local machine's domain to my server's domain.
- PsExec is using a domain administrator account, who is authenticated as a local admin on the server machine.
- The local machine references the server via an alias; it does not use the server's real name.
I am using the command:
"C:\Program Files\PSTools\psexec.exe" \\(server-alias) -u (server-domain)\(domain-admin) -p (password) C:\Windows\System32\inetsrv\appcmd.exe stop site "Default Web Site"
This returns the error:
PsExec v1.94 - Execute processes remotely Copyright (C) 2001-2008 Mark Russinovich Sysinternals - www.sysinternals.com Could not start PsExec service on (server-alias): Access is denied.
And some important troubleshooting notes:
- This command works when executed from another machine (Windows 2003 R2) in the server's domain. (Intra-domain)
- This command also works when executed against another machine running Windows 2003 R2 from my local machine; the two of which are in different domains. (Inter-domain)
- Using the same PsExec command except with ping instead of appcmd.exe fails.
- The command has been run from the command prompt using "Run as Administrator".
- Registry key DisableStrictNameChecking has been set on the server to allow aliases to be used.
- Registry key LocalAccountTokenFilterPolicy = 1 has been set on the server and local machine.
- Windows firewall is not running on the server.
- UAC is disabled on the local machine.
- UAC is active on the server.
- UAC has "Admin Approval mode" disabled on the server; this allowed the command to work intra-domain (as opposed to inter-domain).
It seems to signal that this is an issue specific to Windows 2008 R2 which is security setting related, probably along the lines of domain or administrative permissions. However, I'm out of ideas. Any suggestions you might have would be much appreciated!