Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-Certificate cmdlet already exists during install #159

Closed
mbreaton opened this issue Aug 24, 2016 · 10 comments
Closed

Get-Certificate cmdlet already exists during install #159

mbreaton opened this issue Aug 24, 2016 · 10 comments

Comments

@mbreaton
Copy link

mbreaton commented Aug 24, 2016

Trying to run the following shell commands

Install-Module -Name ACMESharp
Install-Module -Name ACMESharp -Scope CurrentUser

on a Windows 10 1607 install and getting following error:

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.

anyone else seeing this? any workarounds without clobbering the one already installed? I verified ACMESharp is not already installed.

Thanks,

Mike

@bseddon
Copy link
Contributor

bseddon commented Aug 29, 2016

The ACMESharp command is Get-ACMECertificate. You can see in the ACMESharp.psd1 module a default command prefix of 'ACME' applied to all commands. Maybe you could try running the command using

Install-Module -Name ACMESharp -Prefix ACME

This would be to make sure the prefix used really is 'ACME'.

@mbreaton
Copy link
Author

Thanks for the response.

-Prefix is not an option on this version of PS (5.1)

I'm thinking the install is somehow checking for the non-prefixed version, even though it will install with the prefix.

@bseddon
Copy link
Contributor

bseddon commented Aug 30, 2016

Was it dropped from 5.1? The argument has been part of PS since version 3.0 and is shown in the version 5.0 documentation.

Get-Certificate is a valid command in all versions of PS so it seems this would be a command we'd all see clobbered if it were a general problem.

There was a news story last week that Microsoft 'broke' Powershell in Windows 10 with the last update. Maybe this is contribution to your issue? I believe this is scheduled to be addressed in the next update.

@mbreaton
Copy link
Author

mbreaton commented Aug 30, 2016

That's part of the Import-Module used to load the module into the current session. I get the error during the Install-Module which essentially downloads the bit.

I will wait for the next update and try again

@mbreaton
Copy link
Author

mbreaton commented Aug 30, 2016

I tried it with the -AllowClobber option and the install looked to be successful. The original Get-Certificate still works and Get-ACMECertificate appears to run as well. My guess is the installer is looking for the non-aliased name even though it will use a prefix.

@rmc47
Copy link

rmc47 commented Nov 16, 2016

This is also true on Windows Server 2016 (RTM, as seen on Amazon AMI Windows_Server-2016-English-Full-Base-2016.10.18 / ami-7ac78809)

AllowClobber works, but doesn't feel like the right answer?

@ebekker
Copy link
Owner

ebekker commented Nov 17, 2016

For some reason the "clobber checking" that's in the Install-Module or Import-Module doesn't look to see if there is a DefaultCommandPrefix in the module manifest, which ACMESharp does have (ACME) -- with that prefix (or even one that you can specify when you do the import) there is no clobbering.

I would venture to say that this is a bug or oversight on the part of these cmdlets.

@ThomasCr
Copy link

ThomasCr commented Feb 2, 2017

any update? problem still exists

@ebekker
Copy link
Owner

ebekker commented Apr 11, 2017

Apparently a known problem with PowerShellGet.

@ebekker
Copy link
Owner

ebekker commented Aug 23, 2017

See this article for details about this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants