I don’t have the cmdlet Install-PackageProvider on one Win10 which I assume is because PackageManagement is in version 1.0.0.0, and the cmdlet is available on a different Win10 where version of PackageManagement is 1.0.0.1
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 1.0.0.1 on your system already. However, I’ve seen a couple of reports where people had a copy of 1.0.0.0 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.
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.
and Windows 10 says its up to date, so how on earth do I upgrade to 1.0.0.1 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.
I don’t know how you wound up in that situation. Personally, I’d just copy the 1.0.0.1 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.