Automating Octopus Tentacle Installation, issues, please advise much appreciated!

We are trying to deploy an Octopus Tentacle and have it register it to an existing instance through a powershell script. The part that consistently fails is when the Tentacle.exe command is executed to generate the certificate. We are doing this through a Powershell session to the machine and running the following command through that session:

$Cert = cmd.exe `/c Tentacle.exe new-certificate --instance “Admin” --if-blank --console
IF(($Cert[1].Contains(“generated”)) -or ($Cert[1].Contains(“exists”))){

The command fails with the following error

The requested operation cannot be completed. The computer must be trusted for delegation and the current user account must be configured to allow delegation. (Exception from HRESULT: 0x80090345)
System.Runtime.InteropServices.COMException (0x80090345): The requested operation cannot be completed. The computer must be trusted for delegation and the current user account must be configured to allow delegation.

Hi,

Thanks for getting in touch!

It sounds as if there’s a security issue running remote powershell. Are you running this locally or via PowerShell remoting? If the latter, you’ll need to enable credential delegation so the username and password can be passed through to the remote machine. There’s a good description of how to do this in this ServerFault thread.

I hope that helps!
Damo