|
25 | 25 | }
|
26 | 26 | }
|
27 | 27 | if(-not $accountsModule) {
|
28 |
| - $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.2.3' } | Measure-Object).Count -gt 0 |
| 28 | + $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.7.5' } | Measure-Object).Count -gt 0 |
29 | 29 | if($hasAdequateVersion) {
|
30 |
| - $accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.2.3 -Scope Global -PassThru |
| 30 | + $accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.7.5 -Scope Global -PassThru |
31 | 31 | }
|
32 | 32 | }
|
33 | 33 | }
|
34 | 34 |
|
35 | 35 | if(-not $accountsModule) {
|
36 |
| - Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. For installation instructions, please see: https://docs.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop |
37 |
| - } elseif (($accountsModule.Version -lt [System.Version]'2.2.3') -and (-not $localAccounts)) { |
38 |
| - Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop |
| 36 | + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://docs.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop |
| 37 | + } elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) { |
| 38 | + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop |
39 | 39 | }
|
40 | 40 | Write-Information "Loaded Module '$($accountsModule.Name)'"
|
41 | 41 |
|
|
50 | 50 |
|
51 | 51 | # Tweaks the pipeline on module load
|
52 | 52 | $instance.OnModuleLoad = $VTable.OnModuleLoad
|
| 53 | + |
| 54 | + # Following two delegates are added for telemetry |
| 55 | + $instance.GetTelemetryId = $VTable.GetTelemetryId |
| 56 | + $instance.Telemetry = $VTable.Telemetry |
53 | 57 |
|
54 | 58 |
|
55 | 59 | # Tweaks the pipeline per call
|
|
0 commit comments