This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#requires -version 4 | |
<# | |
.SYNOPSIS | |
Gets the current Let's Encrypt certificate by domain from the given opnSense-Firewall via SCP. | |
.DESCRIPTION | |
Sync-Cert connects to the given opnSense-Router via SCP. It pulls the Let's encrypt certificate and key for the given domain name, based on the common name | |
into the local working directory. Afterwards it uses OpenSSL to convert the .cer and .key files to create a new .pfx file which can be used in Exchange and IIS. | |
.PARAMETER Domain | |
Domain of the certificate to get from the firewall | |
.PARAMETER Router |