The command you typed will generate a certificate and add it to the Windows certificate store. But it will not get associated with RD Gateway unless you also use the Set-RDGWCertificate command from Posh-ACME.Deploy. You can either append it to your original command on the pipeline:
Thanks a lot @rmbolger Does it mean that i need to have both ‘posh-acme’ and ‘posh-acme.deploy’ in order to generate and associate certificate with RD gateway ?? Or I can use Set-RDGWCertificate after generating certificate from ‘posh.acme’ ?
You’ll need to have both modules installed in order to have access to both sets of functions, yes. You don’t need to use them in the same command if you don’t want to. You can generate the cert with Posh-ACME and then separately use Posh-ACME.Deploy to add the cert to RD Gateway. That’s totally up to you and how you want to automate things. Personally, I use them both together.
Command PS C:\Users\Administrator> Get-PACertificate '*.abc-dc.com' | Set-RDGWCertificate -RemoveOldCert -Verbose
VERBOSE: Setting new RDGW thumbprint value
Set-Item : Access to the object at RDS:\GatewayServer\SSLCertificate\Thumbprint is denied for the cmdlet Set-Item.The
certificate is not valid or you do not have sufficient permissions to perform this operation.
At C:\Users\Administrator\Documents\WindowsPowerShell\Modules\Posh-ACME.Deploy\Public\Set-RDGWCertificate.ps1:43
char:17