Access Denied - PSEXEC Called from TFS
I am implementing a continuous integration scenario for a SharePoint deployment. After all the features have been built on the build server, I try to deploy the new features to the test server by running STSADM commands through PSEXEC.
When I run my script from whatever computer I go to, it works fine. When I add exec command to my team build project
<Target Name="AfterDropBuild">
<Exec Command="c:\progra~1\pstools\psexec.exe \\testserver -u mydomain\mydomainuser -p mypassword \\BuildServer\CurrentBuild\DeploymentFiles\Deploy.cmd" />
</Target>
The build partially fails and I get an error that is denied in my build logs:
Task "Exec"
Command:
"c:\progra~1\pstools\psexec.exe \\testserver -u mydomain\mydomainuser -p mypassword \\BuildServer\CurrentBuild\DeploymentFiles\Deploy.cmd"
Access is denied.
I added the TFS service account as a local administrator on both the build server and the test server.
Any ideas on why this might work on any box where I am an interactive user, but not when psexec is run from a build agent?
+2
source to share