Problems installing on Windows Server 2012R2 and Powershell 5.x

157 views
Skip to first unread message

pbla...@gmail.com

unread,
Apr 11, 2017, 3:13:01 PM4/11/17
to ACMESharp
I am attempting to install and configure on a Windows 2012 R2 server with Powershell V 5.x.

I get this error...

PS C:\Users\Administrator> Install-Module -Name ACMESharp

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): y

PackageManagement\Install-Package : A command with name 'Get-Certificate' is already available on this system. This
module 'ACMESharp' may override the existing commands. If you still want to install this module 'ACMESharp', use
-AllowClobber parameter.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1772 char:21
+ ...          $null = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package],
   Exception
    + FullyQualifiedErrorId : CommandAlreadyAvailable,Validate-ModuleCommandAlreadyAvailable,Microsoft.PowerShell.Pack
   ageManagement.Cmdlets.InstallPackage

But I have never installed it before. I'm hesitant to use the -AllowClobber because I am not sure what I'd be clobbering.

Any suggestions? 

Eugene Bekker

unread,
Apr 11, 2017, 4:12:56 PM4/11/17
to ACMESharp
In PS5 they introduced a new system cmdlet, Get-Certificate which conflicts with a cmdlet that's in ACMESharp of the same name.  However, that cmdlet in ACMESharp is automatically prefixed (or infixed?) with 'ACME' so when it gets installed and loaded, the actual cmdlet from ACMESharp will be named 'Get-ACMECertificate'.

Eugene Bekker

unread,
Apr 11, 2017, 4:36:22 PM4/11/17
to ACMESharp
The other thing you can do is explicitly set your own Default Command Prefix when loading the module with the Import-Module -Prefix syntax.

If you specify "ACME" for the prefix argument, then you will get the default behavior defined in the module manifest.


Phillip Blanton

unread,
Apr 11, 2017, 5:58:41 PM4/11/17
to ACMESharp
Thanks! I tried the Install-Module with the -Prefix switch, but it failed with "A parameter cannot be found that matches parameter name 'Prefix'."

So I just used the -AllowClobber, trusting that the prefix (infix?) would automatically be applied.

It installed fine and either worked, or the other Get-Certificate is gone and hopefully I'll never notice. :-/

Eugene Bekker

unread,
Apr 11, 2017, 6:30:11 PM4/11/17
to ACMESharp
Sorry -- I may have mixed up two separate commands -- you'll need to do the -AllowClobber on the Install-Module cmdlet, and -Prefix ACME on the Import-Module cmdlet.

But looks like you're all set.

Phillip Blanton

unread,
Apr 11, 2017, 6:31:17 PM4/11/17
to ACMESharp
Thanks! I appreciate your fast response.
Reply all
Reply to author
Forward
0 new messages