Install-Module powershellcookbook -Repository psgallery

Welcome Forums General PowerShell Q&A Install-Module powershellcookbook -Repository psgallery

This topic contains 6 replies, has 6 voices, and was last updated by

 
Participant
2 years, 9 months ago.

  • Author
    Posts
  • #29928

    Participant
    Points: 0
    Rank: Member

    Can't figure out why it won't work/install

    PS C:\Windows\system32> Install-Module powershellcookbook -Repository psgallery
    Get-PSGalleryApiAvailability : PowerShell Gallery is currently unavailable. Please try again
    later.
    At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\PSGet.psm1:948 char:9
    + Get-PSGalleryApiAvailability -Repository $Repository
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [Get-PSGalleryApiAvailability], InvalidOp
    erationException
    + FullyQualifiedErrorId : PowerShellGalleryUnavailable,Get-PSGalleryApiAvailability

    WARNING: Unable to download the list of available providers. Check your internet connection.
    WARNING: Unable to find package provider 'NuGet'.
    PackageManagement\Get-PackageProvider : Unable to find package provider 'NuGet'.
    At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\PSGet.psm1:2439 char:30
    + ... etProvider = PackageManagement\Get-PackageProvider -Name NuGet -Force
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (Microsoft.Power...PackageProvider:GetPackagePr
    ovider) [Get-PackageProvider], Exception
    + FullyQualifiedErrorId : UnknownProvider,Microsoft.PowerShell.PackageManagement.Cmdlets.
    GetPackageProvider

    Install-NuGetClientBinaries : NuGet-anycpu.exe is required to interact with NuGet based
    galleries. Please ensure that NuGet-anycpu.exe is available under 'C:\Program
    Files\PackageManagement\ProviderAssemblies' or
    'C:\Users\kefarrell\AppData\Local\PackageManagement\ProviderAssemblies'.
    At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\PSGet.psm1:962 char:9
    + Install-NuGetClientBinaries
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [Install-NuGetClientBinaries], InvalidOpe
    rationException
    + FullyQualifiedErrorId : CouldNotInstallNuGetBinaries,Install-NuGetClientBinaries

    WARNING: Unable to download the list of available providers. Check your internet connection.
    WARNING: Unable to find module provider 'NuGet'.
    WARNING: The specified PackageManagement provider 'NuGet' is not available.
    PackageManagement\Install-Package : No match was found for the specified search criteria and
    module name 'powershellcookbook'.
    At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\PSGet.psm1:1009 char:21
    + ... $null = PackageManagement\Install-Package @PSBoundParameters
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPacka
    ge) [Install-Package], Exception
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.
    Cmdlets.InstallPackage

    PS C:\Windows\system32>

  • #29997

    Keymaster
    Points: 1,704
    Helping HandTeam Member
    Rank: Community Hero

    Have you verified that this file exists?

    Install-NuGetClientBinaries : NuGet-anycpu.exe is required to interact with NuGet based
    galleries. Please ensure that NuGet-anycpu.exe is available under 'C:\Program
    Files\PackageManagement\ProviderAssemblies' or

  • #31892

    Participant
    Points: 0
    Rank: Member

    I have recently run into this issue, have not since it since day one of V5. I was trying to run find-module for the first time on a few machines... the prompt to setup Nuget, all pretty standard. I was unable to figure it out, then found that OpenDNS was blocking the download location for Nuget-anycpu

  • #35285

    Participant
    Points: 0
    Rank: Member

    WTF! I've got NuGet-anycpu.exe in $env:ProgramFiles\PackageManagement\ProviderAssemblies. I downloaded and put it there manually as PowerShell 5 on Windows 10 refuses to install it:

    NuGet-anycpu.exe is required to continue.
    PowerShellGet requires NuGet-anycpu.exe to interact with NuGet based galleries. NuGet-anycpu.exe must be available in 'C:\Program Files\PackageManagement\ProviderAssemblies' or
     'C:\Users\david-noble\AppData\Local\PackageManagement\ProviderAssemblies'. For more information about NuGet provider, see http://OneGet.org/NuGet.html. Do you want
    PowerShellGet to download NuGet-anycpu.exe now?
    [Y] Yes  [N] No   Suspend  [?] Help (default is "Y"): y
    WARNING: Unable to download the list of available providers. Check your internet connection.
    WARNING: Unable to find package provider 'NuGet'.
    Install-NuGetClientBinaries : NuGet-anycpu.exe is required to interact with NuGet based galleries.  Please ensure that NuGet-anycpu.exe is available under 'C:\Program
    Files\PackageManagement\ProviderAssemblies' or 'C:\Users\david-noble\AppData\Local\PackageManagement\ProviderAssemblies'.
    At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\PSGet.psm1:946 char:9
    +         Install-NuGetClientBinaries
    +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [Install-NuGetClientBinaries], InvalidOperationException
        + FullyQualifiedErrorId : CouldNotInstallNuGetBinaries,Install-NuGetClientBinaries
    
    WARNING: Unable to download the list of available providers. Check your internet connection.
    WARNING: Unable to find module provider 'NuGet'.
    WARNING: The specified PackageManagement provider 'NuGet' is not available.
    PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'NTFSSecurity'.
    At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\PSGet.psm1:993 char:21
    + ...          $null = PackageManagement\Install-Package @PSBoundParameters
    +                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
        + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
    

    It should be impossible that a non-functional package manager is installed with ANY OS. Let me know when this piece of software is ready for prime time.

  • #35286

    Keymaster
    Points: 1,704
    Helping HandTeam Member
    Rank: Community Hero

    David, out of curiosity, are you using the PowerShell v5 "preview" that shipped with Win10, or did you install the "readier for prime time" release when it was briefly available?

  • #35297

    Participant
    Points: 0
    Rank: Member

    Have you tried this?

    https://github.com/OneGet/oneget/wiki/General-Troubleshooting

    Why continuous prompts for installing NuGet provider?

    Problem: I am running Win10 client, November update. Every time I run any of the PSGet cmdlets, I get prompted to install the latest Nuget provider. Why?

    Yes known issue. Will be fixed in TP5.

  • #36417

    Participant
    Points: 21
    Rank: Member

    Kelly, not sure if you ever sorted this but could it be your proxy blocking this?

    I've experienced similar behavior as the proxy at my work location requires authentication. IE will pass this on using Windows Integrated Authentication but the .NET Webclient used by PowerShell doesn't appear to do this.

    $wc = New-Object System.Net.WebClient
    $wc.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
    $wc.DownloadString('http://microsoft.com')

    There is a request on Connect to have this looked at by the PowerShell team.

    https://connect.microsoft.com/PowerShell/feedback/details/754102/a-cmdlet-to-create-a-proxy-configuration-settings-object

    Regards,

    Michael

The topic ‘Install-Module powershellcookbook -Repository psgallery’ is closed to new replies.