I want to deploy a website using the TFS Release Manager and the Web IIS deployt Task. It works perfectly when the account used is a local admin account. But with another non-admin account, I encountered this error :
##[error]Microsoft.PowerShell.Commands.WriteErrorException: System.AggregateException: Failed to install 'VisualStudioRemoteDeployer1fed642b-3699-404d-be6c-f8edb0a59e0a' from service executable path VisualStudioRemoteDeployer.exe . Consult the logs below:
Exception calling "SetRight" with "2" argument(s): "OpenPolicy failed: 5"
CategoryInfo :NotSpecified: (:) [], MethodInvocationException
FullyQualifiedErrorId :Exception
---> System.Management.Automation.RemoteException: Exception calling "SetRight" with "2" argument(s): "OpenPolicy failed: 5"
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.PowershellExecutor.Invoke(String errorContextMessage, Boolean writeResultToLog, Boolean isCancellable)
at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.RemoteDeploymentHelper.InstallServiceInternal(String serviceSourcePath, String serviceName, String destinationFileName)
at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.RemoteDeploymentHelper.InstallService(String serviceSourcePath, String serviceName, String destinationFileName)
at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.DeploymentClient.<RunAsync>d__24.MoveNext()
---> (Inner Exception #0) System.Management.Automation.RemoteException: Exception calling "SetRight" with "2" argument(s): "OpenPolicy failed: 5"<---
I want to know why / which permission this account needs. Browsing the web, I find this post :
But the answer is not sufficient. What is the technical reason/needs that this task should be runned with a local admin account.
Thank you very much for your help.
I think I figured it out. I followed the tutorial here https://technet.microsoft.com/en-us/library/ff700227.aspx
I think most importantly, this command fixed the problem
winrm quickconfig
.That Task, , uses WinRM to communicate with the target machine and WinRM is restricted to Administrators.
If you want to use pure MSDeploy, talking to IIS Management Service through the HTTPS protocol, you can use a different task like MSDeployAllTheThings.