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 185 forks source link

Set-ACMEVault do not recognize the Force command #338

Open BastianFie opened 6 years ago

BastianFie commented 6 years ago

The documentation here said that Set-ACMEVault would accept the force command. However when I try the following:

Set-ACMEVault -BaseService LetsEncrypt-STAGING -Alias Staging -VaultProfile $VaultProfile -Force

I get the error message:

Set-ACMEVault : Missing an argument for parameter 'Force'. Specify a parameter of type 'System.Boolean' and try again. At line:1 char:80

  • ... LetsEncrypt-STAGING -Alias Staging -VaultProfile $VaultProfile -Force
  • 
    + CategoryInfo          : InvalidArgument: (:) [Set-ACMEVault], ParameterBindingException
    + FullyQualifiedErrorId : MissingArgument,ACMESharp.POSH.SetVault

also other tests with true or 1 caused similar issues:

Set-ACMEVault -BaseService LetsEncrypt-STAGING -Alias Staging -VaultProfile $VaultProfile -Force true

Set-ACMEVault : Cannot convert 'System.String' to the type 'System.Boolean' required by parameter 'Force'. At line:1 char:87

  • ... ncrypt-STAGING -Alias Staging -VaultProfile $VaultProfile -Force true
  • 
    + CategoryInfo          : InvalidArgument: (:) [Set-ACMEVault], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgument,ACMESharp.POSH.SetVault

Set-ACMEVault -BaseService LetsEncrypt-STAGING -Alias Staging -VaultProfile $VaultProfile -Force 1

Set-ACMEVault : A parameter cannot be found that matches parameter name 'BLetsEncrypt-STAGING'. At line:1 char:15

  • Set-ACMEVault -BLetsEncrypt-STAGING -Alias Staging -VaultProfile $Vau ...
  • 
    + CategoryInfo          : InvalidArgument: (:) [Set-ACMEVault], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,ACMESharp.POSH.SetVault
j81blog commented 6 years ago

Maybe try -Force $true . The documentation writes "-Force < Boolean >" so a Boolean must me specified, $true or $false. Just "True" is as string, text. If it was written as a "Switch" instead of a "Boolean", the parameter could be used just by specifying the parameter -Force.

BastianFie commented 6 years ago

Hi, thanks for the tip with $true. I will give that a try as well. But the "-Force" as mentioned by you is however not working as written above