ACMESharp
ACMESharp copied to clipboard
Get-AcmeRegistration throws terminating error and does not respect ErrorAction
I believe it should return null but at the very least it must respect ErrorAction SilentlyContinue. The fact that I must put a try/catch around it determine if i need to do New-AcmeRegistration is wrong
PS C:\Users\bcadroot> if (-not (Get-AcmeRegistration -ErrorAction SilentlyContinue) ) {New-ACMERegistration -Contacts "mailto:$email" -AcceptTos} Get-AcmeRegistration : No registrations found At line:1 char:11
- if (-not (Get-AcmeRegistration -ErrorAction SilentlyContinue) ) {New- ...
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : NotSpecified: (:) [Get-ACMERegistration], InvalidOperationException
- FullyQualifiedErrorId : System.InvalidOperationException,ACMESharp.POSH.GetRegistration
I think the error might be your Contacts Parameter, for my uses i never use the "mailto:" prefix to my email address. I know on the Wiki it shows it this way, but i just do plain and simple [email protected] and it works just fine. Try it out, and see if it works for you.
Just a "me too":
PS C:\Users\dave\Desktop> $acmeReg = Get-ACMERegistration -ErrorAction SilentlyContinue Get-ACMERegistration : No registrations found At line:1 char:12
- $acmeReg = Get-ACMERegistration -ErrorAction SilentlyContinue
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : NotSpecified: (:) [Get-ACMERegistration], InvalidOperationException
- FullyQualifiedErrorId : System.InvalidOperationException,ACMESharp.POSH.GetRegistration
Looks like @VitaliHarbiankou is taking care of this request in #261.