I created a build definition for our nightly build server. After creating the project (Windows service), I need to run a Powershell script to install and start the service. Therefore, I added a build step to run a specific version of the Powershell script. Then I installed the TFS build agent and Visual Studio on the (soon to come) nightly build server. After starting the build script, I got exit code 5, which seems to be related to the missing administrator rights. If I run the script as an administrator on the server manually, it works fine. The user used by the agent has already received administrator permissions.
Is there a way to execute a powershell script on an assembly server with an assembly / assembly definition with administrator privileges?
source share