Skip to content

Commit 26a4f28

Browse files
authored
switch to Sort-Object -Unique for 5.1 compat (#155)
1 parent 98e274a commit 26a4f28

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/AzureBasicLoadBalancerUpgrade.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'AzureBasicLoadBalancerUpgrade'
1313

1414
# Version number of this module.
15-
ModuleVersion = '2.5.35'
15+
ModuleVersion = '2.5.36'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
@@ -107,7 +107,7 @@
107107
# IconUri = ''
108108

109109
# ReleaseNotes of this module
110-
ReleaseNotes = 'Fix multi-LB scenario validation to handle inconsistent casing on availability set IDs.'
110+
ReleaseNotes = 'Fix multi-LB scenario validation to handle inconsistent casing on availability set IDs - Windows Powershell compatibility.'
111111

112112
# Prerelease string of this module
113113
# Prerelease = 'beta'

AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/modules/ValidateScenario/ValidateScenario.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ Function Test-SupportedMultiLBScenario {
832832
}
833833

834834
# VMs must share an availability set or the backend must be a single VM with no availability set ('NO_AVAILABILITY_SET')
835-
$uniqueAvailabilitySets = $VMAvailabilitySets.availabilitySetId | Sort-Object | Get-Unique -CaseInsensitive
835+
$uniqueAvailabilitySets = $VMAvailabilitySets.availabilitySetId | Sort-Object -Unique
836836
If (($uniqueAvailabilitySets.count -gt 1 -or ($VMAvailabilitySets.availabilitySetId | Where-Object { $_ -eq 'NO_AVAILABILITY_SET' }).count -gt 1)) {
837837
log -Severity Error -Message "[Test-SupportedMultiLBScenario] The provided Basic Load Balancers do not share backend pool members (VMs are in different or no Availability Sets: '$($uniqueAvailabilitySets -join ',')'). Using -multiLBConfig when backend is not shared adds risk and complexity in recovery." -terminateOnError
838838
}

0 commit comments

Comments
 (0)