You are paying an hourly premium for Azure Load Balancers that route traffic to nowhere. Azure continues to charge a base rate even when your backend pools are completely empty.
Audit your environment for Load Balancers without attached resources and delete them today. Here is the exact PowerShell script to identify these orphaned resources so you can stop paying for them.
The Script
This script queries your Azure environment for Load Balancers and filters out those with empty backend pools. Ensure you are authenticated with your Azure tenant using Connect-AzAccount before running it.
# Get all load balancers and filter for those with empty backend pools
Get-AzLoadBalancer | Where-Object {
$_.BackendAddressPools.Count -eq 0 -or
($_.BackendAddressPools.BackendIPConfigurations.Count -eq 0 -and $_.BackendAddressPools.LoadBalancerBackendAddresses.Count -eq 0)
} | Select-Object Name, ResourceGroupName
Key Technical Details
- Cost Optimization: Azure Standard Load Balancers incur a base hourly charge regardless of traffic volume. You pay this base rate even if zero backend resources are attached to it.
- Permissions Required: You must have at least Reader access at the Subscription or Resource Group level to query these Load Balancer properties successfully.
- Actionable Output: The script cleanly outputs only the
NameandResourceGroupName, giving you exactly what you need to locate and safely remove the unneeded resources via the portal, CLI, or additional automation.