Skip to content

Instantly share code, notes, and snippets.

@adojos
Last active March 10, 2024 10:37
Show Gist options
  • Save adojos/4c9aa1b81f09141f89f37abbdde49e62 to your computer and use it in GitHub Desktop.
Save adojos/4c9aa1b81f09141f89f37abbdde49e62 to your computer and use it in GitHub Desktop.
PowerShell: Upgrade/Uninstall PowerShellGet Module #powershell

Install PowerShellGet Module

The easiest way to upgrade your PowershellGet module is to run the following command:

Find-Module powershellget | Install-Module

Check PowerShellGet Installed Versions

Check your installed versions:

Get-Module powershellget -ListAvailable
Get-Module packagemanagement -ListAvailable

Removing/Uninstalling PowerShellGet

If you have multiple versions, the best thing todo is to remove the older versions. To remove the older versions, do the following:

  1. Browse to C:\Program Files\WindowsPowerShell\Modules\
  2. Go to C:\Program Files\WindowsPowerShell\Modules\PowershellGet folder.
  3. Delete the older version/s folders
  4. Then do the same for C:\Program Files\WindowsPowerShell\Modules\PackageManagement

Now run the Get-Module commands again and see if the old versions are gone.

Get-Module powershellget -ListAvailable
Get-Module packagemanagement -ListAvailable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment