locked
Issue installing "dbatools" and PowerShell Gallery. RRS feed

  • Question

  • When I try to install dbatools in PS V5 I get an error. Any idea what is wrong? 

    I can access in my browser the site mentioned ttps://www.powershellgallery.com/api/v2/ in the error.

    TIA,

    edm2

    PS C:\Users\edm2> install-module dbatools

    WARNING: Unable to resolve package source 'https://www.powershellgallery.com/api/v2/'.

    PackageManagement\Install-Package : No match was found for the specified search criteria and

    module name 'dbatools'. Try Get-PSRepository to see all available registered module repositories.

    At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1772 char:21

    + ...          $null = PackageManagement\Install-Package @PSBoundParameters

    +                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        + CategoryInfo          : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [

       Install-Package], Exception

        + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdle

       ts.InstallPackage

     


    PS C:\Users\edm2> get-psrepository

     

    Name                      InstallationPolicy   SourceLocation

    ----                      ------------------   --------------

    PSGallery                 Untrusted            https://www.powershellgallery.com/api/v2/

     

     

    Thursday, November 30, 2017 9:29 PM

Answers

  • find-module dbatools

    Works fine for the rest of us.


    \_(ツ)_/

    • Marked as answer by edm2 Friday, December 1, 2017 3:06 AM
    Thursday, November 30, 2017 9:55 PM

All replies

  • find-module dbatools

    Works fine for the rest of us.


    \_(ツ)_/

    • Marked as answer by edm2 Friday, December 1, 2017 3:06 AM
    Thursday, November 30, 2017 9:55 PM
  • jrv,

    That worked for me too. Then I installed the module from the PS Command Window, not the ISE as I did before, and it worked!

    edm2

    Thursday, November 30, 2017 10:49 PM
  • Hi,

    I'm checking how the issue is going, was your issue resolved?

    And if the replies as above are helpful, we would appreciate you to mark them as answers, and if you resolve it using your own solution, please share your experience and solution here. It will be greatly helpful to others who have the same question.

    Appreciate for your feedback.

    Best Regards,
    Albert Ling

    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, December 1, 2017 2:08 AM