microsoft / azure-pipelines-extensions

Collection of all RM and deployment extensions
http://www.visualstudio.com/explore/release-management-vs
MIT License
275 stars 425 forks source link

PowerShell on target machines: Different behaviour for manual/automatically triggered releases #1191

Open nordic81Inform opened 9 months ago

nordic81Inform commented 9 months ago

Hi, I've setup a release pipeline to automatically deploy the latest version of our software to an internal server of our company. Therefor I use the tasks "windows machine file copy" and "powershell on target machines" to provide the setup file and install it unattendet.

I've already setup WinRM and CredSSP, the credentials I'm using are from our company's domain (a local admin account wont work).

The problem: When i run the pipeline manually, everything works as expected. But when the automatic trigger hits, the task "powershell on target machines fails with the message

PSSession kann nicht erstellt werden. Fehler: Connecting to remote server *** failed with the following error message : The WinRM client cannot process the request. CredSSP authentication is currently disabled in the client configuration. Change the client configuration and try the request again. CredSSP authentication must also be enabled in the server configuration. Also, Group Policy must be edited to allow credential delegation to the target computer. Use gpedit.msc and look at the following policy: Computer Configuration -> Administrative Templates -> System -> Credentials Delegation -> Allow Delegating Fresh Credentials. Verify that it is enabled and configured with an SPN appropriate for the target computer. For example, for a target computer name "myserver.domain.com", the SPN can be one of the following: WSMAN/myserver.domain.com or WSMAN/*.domain.com For more information, see the about_Remote_Troubleshooting Help topic.

The remote session query failed for **** with the following error message: The WinRM client cannot process the request. CredSSP authentication is currently disabled in the client configuration. Change the client configuration and try the request again. CredSSP authentication must also be enabled in the server configuration. Also, Group Policy must be edited to allow credential delegation to the target computer. Use gpedit.msc and look at the following policy: Computer Configuration -> Administrative Templates -> System -> Credentials Delegation -> Allow Delegating Fresh Credentials. Verify that it is enabled and configured with an SPN appropriate for the target computer. For example, for a target computer name "myserver.domain.com", the SPN can be one of the following: WSMAN/myserver.domain.com or WSMAN/*.domain.com

PSSession konnte für folgenden Computer nicht erstellt werden: **

Even if I manually re-run the failed deployment of an automatically triggered release, everything works just fine. It only fails when running "unattendet".

I definitely do not expect the "RequestedFor" variables to have any impact on the result of the pipeline, but there doesn't seem to be any other difference executing the deployment phase manually vs. automatically.

Any ideas on this?