ebekker / ACMESharp

An ACME client library and PowerShell client for the .NET platform (Let's Encrypt)
https://pkisharp.github.io/ACMESharp-docs/
1.21k stars 184 forks source link

SAN cannot convert error. #197

Open Napsterbater opened 7 years ago

Napsterbater commented 7 years ago

Seems like i'm running the command correctly, but its barking back.

capture

New-ACMECertificate main -Generate -AlternativeIdentifierRefs www,home,mumble,prtg,plex,mirror,mirrors -Alias all

Cannot convert 'www home mumble prtg plex mirror mirrors' to the type 'System.Collections.Generic.IEnumerable`1[System.Obje ct]' required by parameter 'AlternativeIdentifierRefs'. Specified method is not supported.

Napsterbater commented 7 years ago

Nvm, I was using powershell ISE, to a remote server. every other step worked perfectly, except this step. doing it locally on the server worked.

Now if you happen to know why cool if not no big deal.

Thanks for this program.

simonpa71 commented 7 years ago

I'm getting the same error on Windows Server 2012, after downloading the package from Powershell Gallery. In my case, it would not complete the script when only one SAN was specified (autodiscover.example.com) in my case).

New-ACMECertificate : Cannot bind parameter 'AlternativeIdentifierRefs'. Cannot 
convert the "autodiscover.example.com" value of type "System.String" to type 
"System.Collections.Generic.IEnumerable`1[System.Object]".

I made it to work by listing the main name (mail.example.com) as second SAN, so: -AlternativeIdentifierRefs autodiscover.example.com,mail.example.com