Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nordic81Inform opened this issue Sep 12, 2023 · 0 comments

Comments

@nordic81Inform
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant