none
Can't update PowerShellGet to 1.1.2.0 from 1.0.0.1 RRS feed

  • Question

  • I was trying to follow this guide: https://docs.microsoft.com/en-us/powershell/azure/install-azurerm-ps?view=azurermps-6.0.0

    However I am unable to update PowerShellGet.

    First I use Get-Module -Name PowerShellGet -ListAvailable | Select-Object -Property Name,Version,Path to check the version I get the exact thing shown in the guide 1.6.0 and 1.0.0.1

    I try the install command listed: Install-Module PowerShellGet -Force The first time it asks to install NuGet to which I say yes, after that there are no error messages and the command finishes.

    I then check the version again and get that the versions are 1.6.5 and 1.0.0.1

    The required version in the guide is 1.1.2.0. I have tried this on 5 different computers all running Windows 10 all with some version of PowerShell 5.1 always as the administrator and I have tried restarting and updating nothing accomplishes anything.


    Thursday, May 17, 2018 6:35 PM

All replies

  • I try the install command listed: Install-Module PowerShellGet -Force The first time it asks to install NuGet to which I say yes, after that there are no error messages and the command finishes.


    Without the -Force I see why you are getting your result

    Untrusted repository
    You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the
    modules from 'PSGallery'?
    [Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): y
    WARNING: Version '1.0.0.1' of module 'PowerShellGet' is already installed at 'C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1'. To install version '1.6.5', run Install-Module and add the
    -Force parameter, this command will install version '1.6.5' in side-by-side with version '1.0.0.1'.
    PS C:\Windows\system32>

    So, if you wanted something earlier looks like you would need to specify its version somehow with your Install-Module command.

    Looks like there is a syntax which would allow that

        Install-Module [-Name] <String[]> [-AllowClobber] [-Confirm] [-Credential
        <PSCredential>] [-Force] [-MaximumVersion <Version>] [-MinimumVersion <Version>]
        [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-Repository <String[]>]
        [-RequiredVersion <Version>] [-Scope {CurrentUser | AllUsers}] [-SkipPublisherCheck]
        [-WhatIf] [<CommonParameters>]
    

      -RequiredVersion <Version>
            Specifies the exact version of a single module to install. You cannot add this
            parameter if you are attempting to install multiple modules. The MinimumVersion
            and the RequiredVersion parameters are mutually exclusive; you cannot use both
            parameters in the same command.
    



    Robert Aldwinckle
    ---

    Thursday, May 17, 2018 10:33 PM
  • It's not that I want a specific version it's that I want to update 1.0.0.1 to 1.1.2.0 or higher, but from my understanding of the guide 1.6.0 or 1.6.5 were not higher versions than 1.1.2.0 as the guide states that you should start with 1.0.0.1 and 1.6.0 and still need to update to 1.1.2.0. So it's not a matter of a specific version so much as 1.0.0.1 just won't update.
    Friday, May 18, 2018 1:17 PM
  • So it's not a matter of a specific version so much as 1.0.0.1 just won't update.
    What if you removed the 1.0.0.1?   FWIW I don't understand why 1.6 would be less than 1.1


    Robert Aldwinckle
    ---

    Saturday, May 19, 2018 12:16 AM
  • Firstly I did also try removing 1.0.0.1 it did not work not error message it just wasn't removed. The reason I don't think 1.6 is what I need is that the guide said you should start with both 1.0.0.1 and 1.6.0 and update to 1.1.2.0 I don't think it would say that if what you had was already enough.
    Tuesday, May 22, 2018 1:19 PM