PowerShell / PowerShellGallery

228 stars 65 forks source link

PSGallery not available. What is OneGetTestSource PSRepository? #187

Closed Liturgist closed 3 years ago

Liturgist commented 3 years ago

It appears that PSGallery is not working in the same way that it has in the past. Is OneGetTestSource a replacement for PSGallery?

Is OneGetTestSource a reliable place from which to install the Azure Az kit?

PS C:\> [Net.ServicePointManager]::SecurityProtocol
Tls12
PS C:\> Get-PSRepository

Name                      InstallationPolicy   SourceLocation
----                      ------------------   --------------
OneGetTestSource          Trusted              https://www.poshtestgallery.com/api/v2/
PSGallery                 Trusted              https://www.powershellgallery.com/api/v2
LocalRepo                 Trusted              C:\src\Repo

PS C:\> Get-Module -Name Microsoft.PowerShell.Management

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Manifest   7.0.0.0               Microsoft.PowerShell.Management     {Add-Content, Clear-Content, Clear-Item, Clear-ItemProperty…}

PS C:\> Get-InstalledModule -Name Microsoft.PowerShell.Management
Get-Package: C:\program files\powershell\7\Modules\PowerShellGet\PSModule.psm1:9445
Line |
9445 |          PackageManagement\Get-Package @PSBoundParameters | Microsoft. …
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | No match was found for the specified search criteria and module names 'Microsoft.PowerShell.Management'.

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

PS C:\> $PSVersionTable.PSVersion.ToString()
7.1.4
PS C:\> Find-Module -Name az
WARNING: Unable to resolve package source 'https://www.powershellgallery.com/api/v2'.

Version              Name                                Repository           Description
-------              ----                                ----------           -----------
6.3.0                Az                                  OneGetTestSource     Microsoft Azure PowerShell - Cmdlets to manage resources in Azure. This module is compatible with PowerSh…
StevenBucher98 commented 3 years ago

Can you run Get-PackageSource and give us your output? If PSGallery is not registered as a Package Source, please run Unregister-PSRepository PSGallery and then run Register-PSRepository -default.

Liturgist commented 3 years ago

Can you run Get-PackageSource and give us your output? If PSGallery is not registered as a Package Source, please run Unregister-PSRepository PSGallery and then run Register-PSRepository -default.

PSGallery started working ~24 hours later. So, no need for further action. Closing.