Doesn't work for punycode domains
I get this warning first:
Could not set custom hostname 'xn--80aakbcae3au6am7h4b.xn--p1ai'. Details: Microsoft.Rest.Azure.CloudException: The name xn--80aakbcae3au6am7h4b.xn--p1ai is not valid.
and then
Exception calling "UploadFile" with "2" argument(s): "System error." At F:\path\Powershell\LetsEncrypt\WebAppFiles.ps1:28 char:35
-
$webclient.UploadFile($uri, $(Get-ChildItem $File).FullName) -
~~~~~~~~~~~~~~~~~~~- CategoryInfo : NotSpecified: (:) [], MethodInvocationException
- FullyQualifiedErrorId : WebException
Get-ChildItem : Cannot find path 'F:\path\Powershell\LetsEncrypt\web.config' because it does not exist. At F:\path\Powershell\LetsEncrypt\WebAppFiles.ps1:28 char:35
-
$webclient.UploadFile($uri, $(Get-ChildItem $File).FullName) -
~~~~~~~~~~~~~~~~~~~- CategoryInfo : ObjectNotFound: (F:\path\web.config:String) [Get-ChildItem], ItemNotFoundException
- FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
Exception calling "UploadFile" with "2" argument(s): "An exception occurred during a WebClient request." At F:\path\Powershell\LetsEncrypt\WebAppFiles.ps1:28 char:35
-
$webclient.UploadFile($uri, $(Get-ChildItem $File).FullName) -
~~~~~~~~~~~~~~~~~~~- CategoryInfo : NotSpecified: (:) [], MethodInvocationException
- FullyQualifiedErrorId : WebException
and the following at the end:
Failed to validate challenge At F:\path\Powershell\LetsEncrypt\CreateLetsEncryptWebApp.ps1:158 char:5
throw 'Failed to validate challenge'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : OperationStopped: (Failed to validate challenge:String) [], RuntimeException
- FullyQualifiedErrorId : Failed to validate challenge
Wasn't really tested with that. If you want to fix it, feel free to do so. Happy to accept a pull request, but it is not something I plan on working on. Sorry.