在PowerShell中立即安装带有最小值的多个模块
我想知道是否可以在PowerShell中安装多个模块(当然是),但是指定了最小值。
假设我们有两个模块要安装:
- AIPService版本1.0.0.5
- ExchangeOnLineManagement版本2.0.5
是否可以一行进行操作?
我尝试以下操作:
Install-Module -Name AIPService, ExchangeOnlineManagement -MinimumVersion 1.0.0.5, 2.0.5
认为这将有效,这是因为我们能够列出多个模块。
i would like to know if it is possible to install multiple modules in PowerShell (which of course is) but with specifying a minimumversion number.
Let's assume we have two modules to install:
- AIPService version 1.0.0.5
- ExchangeOnlineManagement version 2.0.5
Is it possible to do it in one line?
I tried following:
Install-Module -Name AIPService, ExchangeOnlineManagement -MinimumVersion 1.0.0.5, 2.0.5
Thought that this would work due to the fact, that we are able to list multiple modules.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如文档所示,参数
- MaximumVersion
指定要安装的单个模块的最低版本。在您的情况下,您需要为每个要安装的模块添加两行,因为您想要不同的版本或使用循环和哈希表来安装。像这样的东西:
As the docs show, parameter
-MinimumVersion
specifies the minimum version of a single module to install.In your case, you need do add two separate lines for each module to install because you want a different version or use a loop and a Hashtable to install. Something like: