Last active
April 30, 2017 05:50
-
-
Save animetauren/9b7e5e9e045c0667f3a89cba0e59dae5 to your computer and use it in GitHub Desktop.
ACMESharp DNS Challenge with Azure DNS
This file contains hidden or 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
$compACMEChall = Complete-ACMEChallenge $domain -ChallengeType dns-01 -Handler manual | |
$dnsRRName = ($compACMEChall.Challenges | Where-Object {$_.Type -eq "dns-01"}).Challenge.RecordName | |
$dnsRRValue = ($compACMEChall.Challenges | Where-Object {$_.Type -eq "dns-01"}).Challenge.RecordValue | |
$rs = New-AzureRmDnsRecordSet -Name $dnsRRName -RecordType TXT -Ttl 60 -ZoneName $url -ResourceGroupName $RGName | |
Add-AzureRmDnsRecordConfig -RecordSet $rs -Value $dnsRRValue | |
Set-AzureRmDnsRecordSet -RecordSet $rs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment