PowerShell deployment task - thumbprint as argument

Now that I have my (basic) setup working I’d like to add a custom powershell deployment task which will need the newly minted cert thumbprint as argument.
I see there is a “Pass Results as First Argument” which presumably is how I will get this but I’m not sure what is being passed there - is it documented (if so I missed it…) ?

FWIW I’m trying to automate a Qlik server cert renewal as described here (last post)

Yep, here you go:

So if you opt to pass in the result object as the first parameter that gives you access to a bunch of properties you can use like the certificate thumbprint, the pfx file path etc.

Based a quick look at the Qlik docs, I think you need something like this to get the cert from the store (using the thumbprint) then pipe it to the Connect-Qlik command (untested):

param($result)

Get-ChildItem -Path cert:\LocalMachine\My\$result.ManagedItem.CertificateThumbprintHash  | Connect-Qlik sense-central

I guess you’ll also need to import the module

Import-Module Qlik-Cli

… and you may need to run the task as a specific user in some cases (the default service runs as local system).

Thanks - will experiment a bit and report but seems exactly what I need :slight_smile:

1 Like