PowerShellGet - Why won't it update
Fighting with trying to get the latest version of PowerShellGet on my Windows machine because I wanted to prettify my prompt
You will quickly realize the issue when you try to use an unknown parameter when installing modules i.e. AllowPrerelease
In this case I ran this command Install-Module PSReadLine -AllowPrerelease -Force
PowerShellGet 1.0.0.1 does not have this option or much of anything useful so first try to upgrade it with Update-Module PowerShellGet -Force
Hopefully that worked for you: Check it here Get-Command Install-Module
It did not work for me as it continued to keep PowershellGet 1.0.0.1. Now do the more direct removal of this troublesome library.
- Browse to
C:\Program Files\WindowsPowerShell\Modules\
- Open the folder
C:\Program Files\WindowsPowerShell\Modules\PowershellGet
and delete the subfolder1.0.0.1
- Open the folder
C:\Program Files\WindowsPowerShell\Modules\PackageManagement
and delete the subfolder1.0.0.1
- Browse to
C:\Program Files (x86)\WindowsPowerShell\Modules\
- Open the folder
C:\Program Files (x86)\WindowsPowerShell\Modules\PowershellGet
and delete the subfolder1.0.0.1
- Open the folder
C:\Program Files (x86)\WindowsPowerShell\Modules\PackageManagement
and delete the subfolder1.0.0.1
Now run Install-Module PowerShellGet -Force
and Update-Module PowerShellGet
Check the installation Get-Command Install-Module
Links that helped me solve this