1
1
$AzureRMDependencies = @ {
2
- " Azure.Storage" = " 1.0" ;
3
- " AzureRM.Profile" = " 1.0" ;
2
+ " Azure.Storage" = " 1.0.3 " ;
3
+ " AzureRM.Profile" = " 1.0.3 " ;
4
4
}
5
5
6
6
$AzureRMModules = @ {
7
- " AzureRM.ApiManagement" = " 1.0" ;
8
- " AzureRM.Automation" = " 1.0" ;
9
- " AzureRM.Backup" = " 1.0" ;
10
- " AzureRM.Batch" = " 1.0" ;
11
- " AzureRM.Compute" = " 1.2" ;
12
- " AzureRM.DataFactories" = " 1.0" ;
13
- " AzureRM.DataLakeAnalytics" = " 1.0" ;
14
- " AzureRM.DataLakeStore" = " 1.0" ;
15
- " AzureRM.Dns" = " 1.0" ;
16
- " AzureRM.HDInsight" = " 1.0" ;
17
- " AzureRM.Insights" = " 1.0" ;
18
- " AzureRM.KeyVault" = " 1.1" ;
19
- " AzureRM.Network" = " 1.0" ;
20
- " AzureRM.NotificationHubs" = " 1.0" ;
21
- " AzureRM.OperationalInsights" = " 1.0" ;
22
- " AzureRM.RecoveryServices" = " 1.0" ;
23
- " AzureRM.RedisCache" = " 1.1" ;
24
- " AzureRM.Resources" = " 1.0" ;
25
- " AzureRM.SiteRecovery" = " 1.1" ;
26
- " AzureRM.Sql" = " 1.0" ;
27
- " AzureRM.Storage" = " 1.0" ;
28
- " AzureRM.StreamAnalytics" = " 1.0" ;
29
- " AzureRM.Tags" = " 1.0" ;
30
- " AzureRM.TrafficManager" = " 1.0" ;
31
- " AzureRM.UsageAggregates" = " 1.0" ;
32
- " AzureRM.Websites" = " 1.0" ;
7
+ " AzureRM.ApiManagement" = " 1.0.3 " ;
8
+ " AzureRM.Automation" = " 1.0.3 " ;
9
+ " AzureRM.Backup" = " 1.0.3 " ;
10
+ " AzureRM.Batch" = " 1.0.3 " ;
11
+ " AzureRM.Compute" = " 1.2.1 " ;
12
+ " AzureRM.DataFactories" = " 1.0.3 " ;
13
+ " AzureRM.DataLakeAnalytics" = " 1.0.3 " ;
14
+ " AzureRM.DataLakeStore" = " 1.0.3 " ;
15
+ " AzureRM.Dns" = " 1.0.3 " ;
16
+ " AzureRM.HDInsight" = " 1.0.4 " ;
17
+ " AzureRM.Insights" = " 1.0.3 " ;
18
+ " AzureRM.KeyVault" = " 1.1.2 " ;
19
+ " AzureRM.Network" = " 1.0.3 " ;
20
+ " AzureRM.NotificationHubs" = " 1.0.3 " ;
21
+ " AzureRM.OperationalInsights" = " 1.0.3 " ;
22
+ " AzureRM.RecoveryServices" = " 1.0.4 " ;
23
+ " AzureRM.RedisCache" = " 1.1.1 " ;
24
+ " AzureRM.Resources" = " 1.0.3 " ;
25
+ " AzureRM.SiteRecovery" = " 1.1.2 " ;
26
+ " AzureRM.Sql" = " 1.0.3 " ;
27
+ " AzureRM.Storage" = " 1.0.3 " ;
28
+ " AzureRM.StreamAnalytics" = " 1.0.3 " ;
29
+ " AzureRM.Tags" = " 1.0.3 " ;
30
+ " AzureRM.TrafficManager" = " 1.0.3 " ;
31
+ " AzureRM.UsageAggregates" = " 1.0.3 " ;
32
+ " AzureRM.Websites" = " 1.0.3 " ;
33
33
}
34
34
35
35
function Test-AdminRights ([string ]$Scope )
@@ -70,7 +70,7 @@ function CheckIncompatibleVersion([bool]$Force)
70
70
function Install-ModuleWithVersionCheck ([string ]$Name , [string ]$MinimumVersion , [string ]$Repository , [string ]$Scope , [switch ]$Force )
71
71
{
72
72
$_MinVer = $MinimumVersion
73
- $_MaxVer = " $ ( $_MinVer.Split (" ." )[0 ]) .9999.0 "
73
+ $_MaxVer = " $ ( $_MinVer.Split (" ." )[0 ]) .9999.9999.9999 "
74
74
$script :InstallCounter ++
75
75
try {
76
76
$_ExistingModule = Get-Module - ListAvailable - Name $Name
@@ -117,7 +117,7 @@ function Update-AzureRM
117
117
param (
118
118
[Parameter (Position = 0 , Mandatory = $false )]
119
119
[string ]
120
- $MinVersion ,
120
+ $MajorVersion ,
121
121
[Parameter (Position = 1 , Mandatory = $false )]
122
122
[string ]
123
123
$Repository = " PSGallery" ,
@@ -146,8 +146,8 @@ function Update-AzureRM
146
146
147
147
# Start new job
148
148
$AzureRMModules.Keys | ForEach {
149
- $_MinVer = $MinVersion
150
- if (! $MinVersion ) {
149
+ $_MinVer = $MajorVersion
150
+ if (! $MajorVersion ) {
151
151
$_MinVer = $AzureRMModules [$_ ]
152
152
}
153
153
Install-ModuleWithVersionCheck $_ $_MinVer $Repository $Scope - Force:$force
@@ -173,16 +173,16 @@ function Import-AzureRM
173
173
param (
174
174
[Parameter (Position = 0 , Mandatory = $false )]
175
175
[string ]
176
- $MinorVersion )
176
+ $MajorVersion )
177
177
Write-Output " Importing AzureRM modules."
178
178
179
179
$AzureRMModules.Keys | ForEach {
180
180
$moduleName = $_
181
- $_MinVer = $MinorVersion
182
- if (! MinorVersion ) {
181
+ $_MinVer = $MajorVersion
182
+ if (! MajorVersion ) {
183
183
$_MinVer = $AzureRMModules [$_ ]
184
184
}
185
- $_MaxVer = " $ ( $_MinVer.Split (" ." )[0 ]) .9999.0 "
185
+ $_MaxVer = " $ ( $_MinVer.Split (" ." )[0 ]) .9999.9999.9999 "
186
186
187
187
$_MatchedModule = Get-InstalledModule - Name $moduleName - MinimumVersion $_MinVer - MaximumVersion $_MaxVer - ErrorAction Ignore | where {$_.Name -eq $moduleName }
188
188
if ($_MatchedModule -ne $null ) {
0 commit comments