是否可以使用 PowershellGet 从本地目录或 HTTP 服务器提供的 zip 安装 PowerShell 模块?

问题描述

可以使用来自本地目录的旧社区提供的 PsGet 模块或来自远程 HTTP 服务器的 zip 安装 Powershell 模块:

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

是否可以对 PowershellGet 模块执行相同的操作? PowershellGet 似乎只能从 NuGet 存储库安装模块。

感谢任何建议。

解决方法

我尝试了这个,我们让它工作的唯一方法是在本地机器上创建一个临时的 PowerShell 存储库(使用 Register-PSRepository),然后使用 Install-Module(指定您的新存储库)安装 cmdlet THEN clean上临时存储库。真是一言难尽。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...