When migrating an LB with a single VM backend using PowerShell 5.1, the BackendAddressPool list object is incorrectly typed as System.Object[], causing the migration to fail to populate the backend pool.
Exception setting "LoadBalancerBackendAddressPools": "Cannot convert the "System.Object[]" value of type "System.Object[]" to type "Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool"."
To Reproduce
Steps to reproduce the behavior:
Using PowerShell 5.1
Migrate an LB with a single backend VM
Expected behavior
A clear and concise description of what you expected to happen without this bug 🙂
Describe the bug
When migrating an LB with a single VM backend using PowerShell 5.1, the BackendAddressPool list object is incorrectly typed as System.Object[], causing the migration to fail to populate the backend pool.
Exception setting "LoadBalancerBackendAddressPools": "Cannot convert the "System.Object[]" value of type "System.Object[]" to type "Microsoft.Azure.Commands.Network.Models.PSBackendAddressPool"."
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen without this bug 🙂
Screenshots 📷
2024-06-13T10:26:05-06 [Information] - ############################## Initializing Start-AzBasicLoadBalancerUpgrade ############################## 2024-06-13T10:26:05-06 [Information] - [Start-AzBasicLoadBalancerUpgrade] PowerShell Version: 5.1.22621.3672 2024-06-13T10:26:05-06 [Information] - [Start-AzBasicLoadBalancerUpgrade] AzureBasicLoadBalancerUpgrade Version: 2.4.10
WORKAROUND: