Get-PSrepository error

Welcome Forums General PowerShell Q&A Get-PSrepository error

Viewing 1 reply thread
  • Author
    Posts
    • #182688
      Participant
      Topics: 1
      Replies: 1
      Points: -5
      Rank: Member

      Greetings,

      I am getting a Get-PSrepository error on a disconnected-environment (server with no internet access).

      I am unable to Register my local repository.

      Get-Command -Module PackageManagement | Select-Object -Property Name | Format-Wide -Column 1
      >> Find-package, Find-PackageProvider, Get-Package, Get-PackageProvider, Get-PackageSource, Import-PackageProvider, Install-Package, Install-PackageProvider, Register-PackageSource, Save-Package,Set-PackageSource,Uninstall-Package, Unregister-PackageSource

      NuGet is working at command line, returns all the commands.

      Get-PackageProvider -ListAvailable
      >> returns NuGet (only)

      Find-Module -Name PowerShellGet
      >> Returns a NuGet provider pop-up error, that NuGet must be installed in
      C:\Program Files\PackageManagement\ProviderAssemblies

      It is installed there:
      C:\Program Files\PackageManagement\ProviderAssemblies\NuGet\2.8.5.208\Microsoft.PackageManagement.NuGetProvider.dll

      I keep going round and round???
      I would appreciate any assistance sorting this out.

    • #182754
      Participant
      Topics: 1
      Replies: 1
      Points: -5
      Rank: Member

      When I enter Find-Module -Name n*, I get the error:

      It doesn't find the path for NuGet.exe in:
      $BootstrapNuGetExe
      or
      ($script:NuGetExePath -and (Microsoft.PowerShell.Management\Test-Path -Path $script:NuGetExePath)

      PackageManagement\Import-PackageProvider : No match was found for the specified search criteria and provider name 'NuGet'. Try 'Get-PackageProvider
      -ListAvailable' to see if the provider exists on the system.
      At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7302 char:25
      + ... $null = PackageManagement\Import-PackageProvider -Name $script:Nu ...
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : InvalidData: (NuGet:String) [Import-PackageProvider], Exception
      + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.ImportPackageProvider
      Get the NuGet provider is required to continue pop-up with Yes/No/Suspend

Viewing 1 reply thread
  • You must be logged in to reply to this topic.