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

Error: "Initialize-ACMEVault : Vault root path contains existing vault data" #151

Open JensKirk opened 8 years ago

JensKirk commented 8 years ago

The 3'th line gives the error:

Import-Module ACMESharp
Import-Module ACMESharp\ACMESHARP-IIS
Initialize-ACMEVault

But everything seems to be working...

How to fix it? :-)

gargricha01 commented 8 years ago

Please share the error details. Just sharing my experience - There may a vault already existing or please check for the permissions (for creating folder - we need to login with admin privileges..) Thanks.

dannoh commented 8 years ago

I get the same error. I'm in a brand new directory when I execute.

Initialize-ACMEVault : Vault root path contains existing vault data At C:\scripts\Generate-SSLCertificate.ps1:15 char:1

gargricha01 commented 8 years ago

As per my understanding, unlike the previous version, the newer version of ACMESharp (V0.8.1.0) will create ACMEVault under C:\ProgramData --> ACMESharp\SysVault. We do not need to worry about specifying the location for the vault now. Kindly check once if there is any existing folder under C:\ProgramData. I hope this helps.

janpieterz commented 8 years ago

That is correct. The vault will be created under ProgramData. If you want your script to run the following snippet will initialize the vault if it does not exist, and otherwise it will continue:

if (!(Get-ACMEVault))
{
    Initialize-ACMEVault
}