Created
March 28, 2024 20:03
-
-
Save matejskubic/db4199660e75e067e82f7cf94d3ebb67 to your computer and use it in GitHub Desktop.
D365FO - renew certificate with Let's Encrypt
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<staticContent> | |
<mimeMap fileExtension="." mimeType="text/plain" /> | |
</staticContent> | |
</system.webServer> | |
</configuration> |
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
#Install-Module -Name Posh-ACME -Scope AllUsers | |
$contact = '[email protected]' | |
$domain = '...devaos.cloudax.dynamics.com' | |
$certNames = @('...devaossoap.cloudax.dynamics.com') | |
Set-PAAccount -Contact $contact | |
$response = New-PACertificate -Domain $domain -DnsAlias $certNames -Plugin WebRoot -PluginArgs @{WRPath='C:\inetpub\wwwroot'; Verbose=$true} -AcceptTOS -Verbose | |
Install-PACertificate -PACertificate $response -StoreLocation LocalMachine -StoreName My | |
$site = Get-WebBinding -HostHeader $domain | |
$site.RebindSslCertificate($response.Thumbprint, $site.certificateStoreName) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment