Skip to content

Can't install modules from PSGallery #15506

@Mjj87776

Description

@Mjj87776

Steps to reproduce



PS C:\Windows\System32> Install-Module ExchangeOnlineManagement
WARNING: Unable to resolve package source 'https://www.powershellgallery.com/api/v2'.
Install-Package: C:\program files\powershell\7\Modules\PowerShellGet\PSModule.psm1:9711
Line |
9711 |  … talledPackages = PackageManagement\Install-Package @PSBoundParameters
     |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | No match was found for the specified search criteria and module name 'ExchangeOnlineManagement'. Try
     | Get-PSRepository to see all available registered module repositories.

Expected behavior


Actual behavior

PS C:\Windows\System32> Install-Module ExchangeOnlineManagement -Verbose -Debug
DEBUG: 00:00:00.0000001 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:00.0000356 Name: ExchangeOnlineManagement
DEBUG: 00:00:00.0000491 Verbose: True
DEBUG: 00:00:00.0000565 Debug: True
DEBUG: 00:00:00.0026067 INVOKING PowerShell Fn Get-DynamicOptions with args Provider that has length 1
DEBUG: 00:00:00.0032679 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.0044567 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:00.0091190 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:00.0091446 Name: ExchangeOnlineManagement
DEBUG: 00:00:00.0091520 Verbose: True
DEBUG: 00:00:00.0091588 Debug: True
DEBUG: 00:00:00.0098284 INVOKING PowerShell Fn Get-DynamicOptions with args Source that has length 1
DEBUG: 00:00:00.0103915 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.0117005 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:00.0137037 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:00.0137299 Name: ExchangeOnlineManagement
DEBUG: 00:00:00.0137379 Verbose: True
DEBUG: 00:00:00.0137443 Debug: True
DEBUG: 00:00:00.0144086 INVOKING PowerShell Fn Get-DynamicOptions with args Package that has length 1
DEBUG: 00:00:00.0150325 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.0173225 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:00.0195862 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:00.0196125 Name: ExchangeOnlineManagement
DEBUG: 00:00:00.0196199 Verbose: True
DEBUG: 00:00:00.0196268 Debug: True
DEBUG: 00:00:00.0202156 INVOKING PowerShell Fn Get-DynamicOptions with args Install that has length 1
DEBUG: 00:00:00.0207667 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.0226469 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:00.0343107 Calling SearchForPackages. Name='ExchangeOnlineManagement'
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
DEBUG: 00:00:00.0353564 PackageProvider::FindPackage with name ExchangeOnlineManagement
DEBUG: 00:00:00.0363589 Calling SearchForPackages After Select 1
DEBUG: 00:00:00.0378531 Calling New() : MethodName = 'FindPackage'
DEBUG: 00:00:00.0384285 Verbose: True
DEBUG: 00:00:00.0390176 Name: ExchangeOnlineManagement
DEBUG: 00:00:00.0395570 Scope: CurrentUser
DEBUG: 00:00:00.0400839 ProviderName: PowerShellGet
DEBUG: 00:00:00.0406215 Debug: True
DEBUG: 00:00:00.0413142 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:00.0421523 Type: Module
DEBUG: 00:00:00.0584236 INVOKING PowerShell Fn Find-Package with args System.String[], , ,  that has length 4
DEBUG: 00:00:00.0608427 In PowerShellGet Provider - 'Find-Package'.
DEBUG: 00:00:00.0619294 OPTION: Verbose => True
DEBUG: 00:00:00.0625510 OPTION: Name => ExchangeOnlineManagement
DEBUG: 00:00:00.0631710 OPTION: Scope => CurrentUser
DEBUG: 00:00:00.0638907 OPTION: ProviderName => PowerShellGet
DEBUG: 00:00:00.0647056 OPTION: Debug => True
DEBUG: 00:00:00.0654178 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:00.0659782 OPTION: Type => Module
VERBOSE: The -Repository parameter was not specified.  PowerShellGet will use all of the registered repositories.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2' and PackageManagementProvider is 'NuGet'.
DEBUG: 00:00:00.0711990 PackageProvider::FindPackage with name ExchangeOnlineManagement
DEBUG: 00:00:00.0731945 Calling 'NuGet'::'FindPackage' - name='ExchangeOnlineManagement', requiredVersion='',minimumVersion='', maximumVersion='''.
DEBUG: 00:00:00.0739694 Iterating 'ExchangeOnlineManagement'.
DEBUG: 00:00:00.0760626 There are '0' registered sources in 'NuGet' provider.
DEBUG: 00:00:00.0768264 Source 'https://www.powershellgallery.com/api/v2' is not one of the registered sources in 'NuGet' provider.
WARNING: Unable to resolve package source 'https://www.powershellgallery.com/api/v2'.

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): Y
VERBOSE: Total package yield:'0' for the specified package 'ExchangeOnlineManagement'.
DEBUG: 00:00:01.3022692 Completed iterating for 'ExchangeOnlineManagement'.
DEBUG: 00:00:01.3033743 Calling 'NuGetRequest'::'FindRegisteredSource', 'https://www.powershellgallery.com/api/v2'.
DEBUG: 00:00:01.3041977 PowerShell Script 'PSModule' Function 'Find-Package' returns null.
DEBUG: 00:00:01.3052509 Done calling powershell «Find-Package» «PSModule»
DEBUG: 00:00:01.3062885 unmatched package name='ExchangeOnlineManagement'
Install-Package: C:\program files\powershell\7\Modules\PowerShellGet\PSModule.psm1:9711
Line |
9711 |  … talledPackages = PackageManagement\Install-Package @PSBoundParameters
     |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | No match was found for the specified search criteria and module name 'ExchangeOnlineManagement'. Try
     | Get-PSRepository to see all available registered module repositories.



Environment data


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions