首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装AzureRM.*模块的特定版本

安装AzureRM.*模块的特定版本
EN

Stack Overflow用户
提问于 2016-03-16 14:34:57
回答 1查看 1.3K关注 0票数 4

我想安装所有AzureRM.*模块的特定版本,因为有26个模块,所以我不想一个接一个地手动安装:

代码语言:javascript
复制
PS C:\Users\hyar> find-module -name azurerm.*

Version    Name                                Type       Repository           Description
-------    ----                                ----       ----------           -----------
1.0.5      AzureRM.profile                     Module     PSGallery            Microsoft Azure PowerShell - Profile ...
1.0.5      AzureRM.Storage                     Module     PSGallery            Microsoft Azure PowerShell - Storage ...
1.0.5      AzureRM.Automation                  Module     PSGallery            Microsoft Azure PowerShell - Automati...
1.0.5      AzureRM.Resources                   Module     PSGallery            Microsoft Azure PowerShell - Azure Re...
1.2.4      AzureRM.Compute                     Module     PSGallery            Microsoft Azure PowerShell - Compute ...
1.0.5      AzureRM.ApiManagement               Module     PSGallery            Microsoft Azure PowerShell - Api Mana...
1.0.5      AzureRM.Backup                      Module     PSGallery            Microsoft Azure PowerShell - Azure Ba...
1.0.5      AzureRM.Network                     Module     PSGallery            Microsoft Azure PowerShell - Network ...
1.0.6      AzureRM.HDInsight                   Module     PSGallery            Microsoft Azure PowerShell - HDInsigh...
1.0.5      AzureRM.Batch                       Module     PSGallery            Microsoft Azure PowerShell - Batch se...
1.0.5      AzureRM.DataFactories               Module     PSGallery            Microsoft Azure PowerShell - DataFact...
1.0.5      AzureRM.Insights                    Module     PSGallery            Microsoft Azure PowerShell - Insights...
1.1.4      AzureRM.SiteRecovery                Module     PSGallery            Microsoft Azure PowerShell - SiteReco...
1.0.5      AzureRM.Sql                         Module     PSGallery            Microsoft Azure PowerShell - Sql serv...
1.0.5      AzureRM.Dns                         Module     PSGallery            Microsoft Azure PowerShell - Dns serv...
1.1.3      AzureRM.RedisCache                  Module     PSGallery            Microsoft Azure PowerShell - RedisCac...
1.0.5      AzureRM.OperationalInsights         Module     PSGallery            Microsoft Azure PowerShell - Operatio...
1.1.4      AzureRM.KeyVault                    Module     PSGallery            Microsoft Azure PowerShell - KeyVault...
1.0.5      AzureRM.Websites                    Module     PSGallery            Microsoft Azure PowerShell - Websites...
1.0.5      AzureRM.Tags                        Module     PSGallery            Microsoft Azure PowerShell - Tags ser...
1.0.5      AzureRM.StreamAnalytics             Module     PSGallery            Microsoft Azure PowerShell - StreamAn...
1.0.5      AzureRM.TrafficManager              Module     PSGallery            Microsoft Azure PowerShell - TrafficM...
1.0.5      AzureRM.UsageAggregates             Module     PSGallery            Microsoft Azure PowerShell - UsageAgg...
1.0.5      AzureRM.DataLakeAnalytics           Module     PSGallery            Microsoft Azure PowerShell - Data Lak...
1.0.5      AzureRM.DataLakeStore               Module     PSGallery            Microsoft Azure PowerShell - Data Lak...
1.0.6      AzureRM.RecoveryServices            Module     PSGallery            Microsoft Azure PowerShell - Recovery...
1.0.5      AzureRM.NotificationHubs            Module     PSGallery            Microsoft Azure PowerShell - Notifica...
1.0.1      AzureRM.LogicApp                    Module     PSGallery            Microsoft Azure PowerShell - LogicApp...
0.9.2      AzureRM.AzureStackAdmin             Module     PSGallery            Microsoft Azure Stack Administration ...
0.9.3      AzureRM.AzureStackStorage           Module     PSGallery            Microsoft Azure PowerShell - Storage ...
0.7.1.1    AzureRM.Profile.Dsc                 Module     PSGallery            DSC Resources for AzureRM.Profile

因此,我在这些模块上寻找这样一个命令,它的版本大于1.0.4

代码语言:javascript
复制
find-module -name "azurerm.*" -requiredversion 1.0.4 | install-module -force

或执行for-每一个列表项的任何其他powershell技巧。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-03-16 21:14:27

代码语言:javascript
复制
[Version] $cut = New-Object Version("1.0.4")
Find-Module -Name AzureRM.* | Where {$_.Version.CompareTo($cut) -eq 1}

这依赖于版本:比较

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36038746

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档