How to upgrade PackageManagement module itself from version to

I don’t have the cmdlet Install-PackageProvider on one Win10 which I assume is because PackageManagement is in version, and the cmdlet is available on a different Win10 where version of PackageManagement is

So, what is the proper way of upgrading this module?

(Update-Module does not work, only says “was not installed by using Install-Module, so it cannot be updated”)

If you’re running the latest Windows 10 updates, you should have a copy of on your system already. However, I’ve seen a couple of reports where people had a copy of in their $pshome\Modules folder (instead of Program Files\WindowsPowerShell\Modules) from some old WMF 5 preview, and that causes the older module to load up first.

What do you get when you run this command?

Get-Module PackageManagement -ListAvailable

I came across this issue the other day when I wanted to install the new powershell ISE preview using package management built into Windows 10. When I ran find-module ise I was prompted to install powershellget (I believe) then I got errors relating to not having a install-packageprovider cmdlet available. I found 3 instances of the package management module on my computer and compared the cmdlets available in each. I decided to remove package management folder from the system32 module path for powershell and this forced the console to import the module from the program files directory, which happily solved my problem. I have not installed any of the individual WMF5 releases, however my PC has been on Win10 insider preview for a while going through upgrades and no clean installs, and I’m on the most recent November update.

Very curious.

I have a full retail (no preview) version of Win10 and I see both a as well as version.

I’m curious if it got installed by by some other preview module…

thanks for feedback Dave, seems that only is listed as available:

Get-Module PackageManagement -ListAvailable
    Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Binary    PackageManagement                   {Find-Package,
Get-Package, Get-PackageProvider, Get-PackageSource...}

and it is in the proper place:

ls 'C:\Program Files\WindowsPowerShell\Modules\PackageManagement\'
    Directory: C:\Program Files\WindowsPowerShell\Modules\PackageManagement
Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d---s-       10.07.2015     18.33      

and there’s no PackageManagement module i $pshome:

ls $PSHOME\Modules\P*
    Directory: C:\Windows\System32\WindowsPowerShell\v1.0\Modules
Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       10.07.2015     13.04                PcsvDevice
d---s-       10.07.2015     18.33                PKI
d-----       10.07.2015     13.04                PnpDevice
d-----       10.07.2015     13.04                PrintManagement
d---s-       10.07.2015     18.33                PSDesiredStateConfiguration
d-----       10.07.2015     13.04                PSDiagnostics
d---s-       10.07.2015     13.04                PSScheduledJob
d---s-       10.07.2015     13.04                PSWorkflow
d---s-       10.07.2015     13.04                PSWorkflowUtility

and Windows 10 says its up to date, so how on earth do I upgrade to without doing it as a hack? I would also assume that this should have been a part of a Windows update, probably the big one in November.

any help greatly appreciated.

I don’t know how you wound up in that situation. Personally, I’d just copy the folder from a working machine, rather than trying to figure out what went wrong with Windows Update.

Had same problem. Resolved by installing latest version of Windows10. Make sure you are not deferring updates in the Advanced properties of Windows Update.