Hi, if your script works that’s great but it’s working against the information that we provide in the $result object, namely your trying to discover and export the cert from the certificate store rather than using the certificate file we already give you. Presumably you’re doing that because you couldn’t get the example script working or you want to run this script outside of the Certify renewal process.
Future versions will let you setup a deployment step (such as export to .pem etc) and defer execution until you call it from the command line, that way you can have renewals happen normally but the actual deployment (either locally or remote) can happen either manually during a maintenance window or on a scheduled task.