rmbolger / Posh-ACME

PowerShell module and ACME client to create certificates from Let's Encrypt (or other ACME CA)
https://poshac.me/docs/latest/
MIT License
778 stars 190 forks source link

How do you check for current installed version of Posh-ACME client and how do you upgrade the Posh-ACME client #558

Closed jskang-netex closed 4 months ago

jskang-netex commented 4 months ago

I apologize in advance for my lack of knowledge on how the Posh-ACME module works. I've looked through the v4 docs and FAQs and didn't see any reference to my specific questions. I also tried searching the issues already reported here as well.

How do you go about seeing what version of the Posh-ACME module is currently installed?

How do you check to see if the module was installed for all users or current user?

How do you keep the Posh-ACME module updated? Is there a built-in command that does this or do you just run "Install-Module -Name Posh-ACME -Scope " whenever you want to update to the latest version?

Thanks in advance!

rmbolger commented 4 months ago

Hi @jskang-netex, thanks for reaching out. The info you're looking for is not in the docs because it's more general PowerShell knowledge than anything specific to the Posh-ACME module. But I'm glad to help out.

To check what version (or versions) of the module are installed and where, use this command. The directory shown should indicate which scope it was installed to (within a user profile or in a system-wide folder).

Get-Module Posh-ACME -ListAvailable

To check what version of the module is currently loaded, use the same command but without the -ListAvailable parameter. If nothing is returned, it just means it hasn't been imported yet.

Get-Module Posh-ACME

Updating the module depends on how you originally installed it. But if you used the recommended Install-Module approach, there's a corresponding Update-Module command that you can use like this. There are additional parameters you can use if you want a specific version.

Update-Module Posh-ACME

The Update-Module command won't uninstall the old version and PowerShell will automatically import the new version in your next session. But if you want to get rid of the old version as well, you'll need the Uninstall-Module command for the specific version you want to get rid of. For example:

Uninstall-Module Posh-ACME -RequiredVersion 4.15.0
jskang-netex commented 4 months ago

Yes, I am very much a very basic and infrequent user of PowerShell. lol.

Yes, I installed it based on the documented directions here so everything you've spelled out should work for me.

Thanks so much for the quick reply and help. It's greatly appreciated!

ETA: I tried to "close with comment" but maybe not an option for me?

rmbolger commented 4 months ago

Feel free to come back with any additional questions.