How to upgrade PackageManagement module itself from version 1.0.0.0 to 1.0.0.1?

This topic contains 6 replies, has 5 voices, and was last updated by Profile photo of Developer Wonk Developer Wonk 5 months, 2 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #34540
    Profile photo of Erik Hjelmås
    Erik Hjelmås
    Participant

    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")

    #34549
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    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.

    What do you get when you run this command?

    Get-Module PackageManagement -ListAvailable

    #34583
    Profile photo of Peter Jurgens
    Peter Jurgens
    Participant

    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.

    #34586
    Profile photo of Justin King
    Justin King
    Participant

    Very curious.

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

    I'm curious if it got installed by by some other preview module...

    #34595
    Profile photo of Erik Hjelmås
    Erik Hjelmås
    Participant

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

    Get-Module PackageManagement -ListAvailable
        Directory: C:\Program Files\WindowsPowerShell\Modules
    ModuleType Version    Name                                ExportedCommands
    ---------- -------    ----                                ----------------
    Binary     1.0.0.0    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                1.0.0.0
    

    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 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.

    any help greatly appreciated.

    #34597
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    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.

    #37890
    Profile photo of Developer Wonk
    Developer Wonk
    Participant

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

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.