0

A Powershell module can be installed using the old community-provided PsGet module from a local directory or a zip from a remote HTTP server:

PSGet\Install-Module -ModulePath "C:\path\to\source\of\MyModule"
PsGet\Install-Module -ModuleUrl "http://path/to/MyModule.zip"

Is it possible to do the same with the PowershellGet module? It seems PowershellGet can only install modules from NuGet repos.

Any suggestion is appreciated.

Mikey
  • 91
  • 1
  • 7
  • from the docs "You use the cmdlets in the PowerShellGet module to install packages from the PowerShell Gallery." so this module is ment to install modules explicitly from the gallery. https://learn.microsoft.com/en-us/powershell/scripting/gallery/getting-started?view=powershell-7.1 – Guenther Schmitz Apr 07 '21 at 08:12
  • I thought PowerShellGet was a replacement for PsGet. Its functions have same names. So that means I'll need to use both of them. – Mikey Apr 07 '21 at 14:35

1 Answers1

1

I tried this and the only way we got it to work was to create a temporary PowerShell repository on the local machine (using Register-PSRepository) and then use Install-Module (specifying your new repo) to install the cmdlet THEN clean up the temporary repository. Quite a faff.

CGFootman
  • 136
  • 1
  • 4