Select to view content in your preferred language

Unable to register PowerShell Repository

3129
0
10-09-2019 08:04 AM
CliveSwan
Frequent Contributor

Greetings,

 

I used an online article to install in a disconnected/offline environment, where Powershell is already installed on the machine. URL: https://stackoverflow.com/questions/51406685/how-do-i-install-the-nuget-provider-for-powershell-on-a...

 

I copied/exported the repository and also copied the offlinepowershellgetdeploy.nupkg to an folder, that the disconnected machine could connect to.

 

The following modules are installed under C:\Program Files\WindowsPowerShell\Modules:

ArcGIS, PowerShellGet, PackageManagement

 

I then used the publish .nupkg command, this completed successfully.

## Install offlinepowershellgetdeploy

NuGet.exe install -o extract-directory "offlinepowershellgetdeploy" -source "D:\localhost\LocalPSRepo"

I also installed .nupkg for ArcGIS, PowerShellGet, PackageManagement.

 

I then ran PS commands:

Get-PSRepository

Error: Unable to find module providers (PowerShellGet)

Find-Module -Repository LocalPSRepo

>> NuGet is required

I then get a pop-up window and error message to install NuGet:

>> PackageManagement\Get-PackageSource : Unable to find module providers (PowerShellGet)

PowershellGet.psd1 is installed @ C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1

 

## Get Packages

Get-PackageProvider -ListAvailable

>> NuGet 2.8.5.208

 

Any suggestions how to get the offline repository (LocalPSRepo) registered on the disconnected server,  is much appreciated..

 

Clive

0 Kudos
0 Replies