Skip to content

Instantly share code, notes, and snippets.

@animetauren
Last active April 30, 2017 05:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save animetauren/9b7e5e9e045c0667f3a89cba0e59dae5 to your computer and use it in GitHub Desktop.
Save animetauren/9b7e5e9e045c0667f3a89cba0e59dae5 to your computer and use it in GitHub Desktop.
ACMESharp DNS Challenge with Azure DNS
$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