PowerShell/PowerShellGetv2

uninstall Microsoft.PowerShell.SecretStore not working

mi-hol opened this issue · 3 comments

Tried to remove all versions of Microsoft.PowerShell.SecretStore, but wasn't successful.

Any hints appreciated.

PS C:\> Get-Module Microsoft.PowerShell.SecretStore -li

    Directory: C:\Users\StdUser\OneDrive - Corp\Documents\PowerShell\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Binary     0.9.0                 Microsoft.PowerShell.SecretStore    Core      {Unlock-SecretStore, Set-SecretStorePas…
Binary     0.5.4      preview4   Microsoft.PowerShell.SecretStore    Core      {Unlock-SecretStore, Set-SecretStorePas…

    Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Binary     0.9.0                 Microsoft.PowerShell.SecretStore    Core      {Unlock-SecretStore, Set-SecretStorePas…

PS C:\> Uninstall-Module Microsoft.PowerShell.SecretStore -Force -allVersions
PS C:\> Get-Module Microsoft.PowerShell.SecretStore -li

    Directory: C:\Users\StdUser\OneDrive - Corp\Documents\PowerShell\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Binary     0.9.0                 Microsoft.PowerShell.SecretStore    Core      {Unlock-SecretStore, Set-SecretStorePas…
Binary     0.5.4      preview4   Microsoft.PowerShell.SecretStore    Core      {Unlock-SecretStore, Set-SecretStorePas…

    Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Binary     0.9.0                 Microsoft.PowerShell.SecretStore    Core      {Unlock-SecretStore, Set-SecretStorePas…

PS C:\>

This is a PowerShellGet Uninstall-Module issue, so I will transfer this issue to there. The PowerShell team is working on a v3 version of PowerShellGet and can be addressed in that release.

could be related to PowerShell/PowerShellGet#262 and PowerShell/PowerShellGet#365

Hi @mi-hol thanks for reaching out! Are you running this on WindowsPowerShell or PowerShell 6+? (You can run $PSVersionTable in the powershell terminal to find out)

If you are running this on WindowsPowerShell you need to run WindowsPowerShell as Admin and then run:
Uninstall-Module Microsoft.PowerShell.SecretStore -Force -allVersions again

In PowerShell 6+ you can run
Uninstall-Module Microsoft.PowerShell.SecretStore -Force -allVersions and it should be good