简体   繁体   中英

Grant tfs build to execute sharepoint cmdlet

I use TFS Build which is configured with a service account.

I've modified the worklow template to execute a powershell script.

The powershell is launched but on sharepoint cmdlet I have an "access denied error".

So I tested the script with run as different user (using tfs build service account) and it works.

The tfs service account SpShelleAdmin, local admin and farm admin.

I need help.

PS : Get-SpSolution works

How have you implemented the support for executing powershell?
You could implement a custom activity that actually does the powershell invoking by using the System.Management.Automation namespace (a very nice example can be found here ). Just surround the implementation with the Impersonation class presented here .

Also check this post if it gets you any help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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