简体   繁体   English

访问被拒绝-从TFS调用PSEXEC

[英]Access is denied - PSEXEC Called from TFS

I'm implementing a continuous integration scenario for a SharePoint deployment. 我正在为SharePoint部署实现连续集成方案。 After all features have been build on the build server, I'm attempting to deploy the new features to the test server by running STSADM commands through PSEXEC. 在构建服务器上构建完所有功能之后,我试图通过通过PSEXEC运行STSADM命令将新功能部署到测试服务器。

When I run my script from any machine where I'm logged in, it runs fine. 当我从登录的任何计算机上运行脚本时,脚本运行良好。 When I add an exec command to my team build project 当我向团队构建项目添加exec命令时

 <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 access 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've added the TFS Service account as a local admin on both the build server and the test server. 我已经在构建服务器和测试服务器上将TFS服务帐户添加为本地管理员。

Any ideas of why this might be working on any box where I'm an interactive user, but not when psexec is run from the build agent? 关于为什么这可能在我是交互式用户的任何设备上都有效的任何想法,但是从构建代理运行psexec时却无法解决?

It was a permissions issue accessing psexec in the program files directory. 访问程序文件目录中的psexec是一个权限问题。 I added read permissions to the tfs service and it fixed the issue. 我向tfs服务添加了读取权限,从而解决了该问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM