Skip to main content


 

Symptoms


PowerShell script to Refresh the service instance
 

Diagnoses


We have created a PowerShell script to refresh the K2 Service INstance... however, when we run it, it throws the error called "Primary Credential not Authenticated".
 

Resolution

The connection string that was being passed in as a string parameter was:

"Host=k2.denallix.comPort=5555Integrated=TrueIsPrimaryLogin=True"

In which the "Authenticate=True" parameter was missing (the EncryptedPassword from below is applicable if you are passing in a username and password). We were able to connect using Integrated authentication with the connection string below:

"Integrated=TrueIsPrimaryLogin=TrueAuthenticate=TrueEncryptedPassword=FalseHost=k2.denallix.comPort=5555"

It is recommended that the "SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder" type/object be used to create/build the connection string. Below is a blog about K2 connection Strings:

http://microsoft-techies.blogspot.com/2014/03/k2-blackpearl-connections-strings.html




 

Could you please share powershell script that does refresh service instance and smart object.

 

Thanks,

Raj


Reply