Table of Contents
Overview
There are some example scripts bundled with releases (starting with 1.9.7.2) to provide some simple install scripts and also to show the proof-of-concept of using install scripts.
Parameters
They will take either the thumbprint or the path of the .pfx file (as well as the password in this case). These should be passed with the bracket variables documented in the Install-Script wiki page.
Example:
--installation script --script "./Scripts/ImportRDGateway.ps1" --scriptparameters "'{CertThumbprint}'"
This will take the thumbprint of the new cert generated by this tool and set the RD Gateway to use that cert for the listener. Note that the RD Gateway should use the same cert as the IIS service, so this script by itself may not be helpful unless you are also updating the IIS certificate using either another Powershell script or the IIS plugin.
Error handling
We include a basic check if the Thumbprint or file was even found. If it is then the rest of the process is wrapped in a try/catch statement. If any error is encountered, the process stops and logs the error message.
Also of note is the wrapper we have to copy certs into the Personal Store that weren't put there by win-acme. That logic is not necessary if settings.config is setup appropriately.
Please refer to https://pkisharp.github.io/win-acme/ for up-to-date documentation.