Skip to main content
Load Balancer Ghost Hunter

Azure Load BalancerGhost Hunter

Professional PowerShell script that hunts down forgotten and unused Azure Load Balancers consuming resources but not serving traffic. Intelligent ghost scoring with cost estimation and comprehensive reporting.

Blaze
Blaze says:Ghost Load Balancers with a score of 80+ are almost always safe to nuke — they have no backend pools, no rules, and no health probes. That's $18-23/month each just sitting there haunting your bill.
Quick Start
# Hunt all subscriptions
.\Azure-LoadBalancer-GhostHunter.ps1
# Target specific subscription
.\Azure-LoadBalancer-GhostHunter.ps1 -SubscriptionIds "sub-id"
# Custom output path
.\Azure-LoadBalancer-GhostHunter.ps1 -CsvPath"./reports/"

Standard ghost-hunting workflow

Structured quick-reference sections for prerequisites, installation, usage, and troubleshooting.

Prerequisites

  • PowerShell 5.1+ with Azure PowerShell modules (Az.Accounts, Az.Network, Az.Resources)
  • Reader access on target subscriptions and load balancer resources
  • Azure authentication configured before execution (`Connect-AzAccount`)
  • Local folder path available for CSV/HTML output if using custom paths

Key parameters

ParameterPurposeExample
-SubscriptionIdsScopes the scan to one or more subscriptions"sub-123,sub-456"
-CsvPathSets custom CSV report path"./reports/ghosts.csv"
-HtmlPathSets custom HTML report path"./reports/ghosts.html"

If no output paths are provided, the script generates timestamped report files automatically.

Standard ghost-hunting workflow

  1. 1Run a tenant-wide scan first to establish the baseline and identify high-score ghost candidates.
  2. 2Filter the report for `GhostScore >= 80` and review backend pools/rules before remediation.
  3. 3Validate ownership and environment context for high-cost load balancers before deleting or resizing.
PowerShell
.\\Azure-LoadBalancer-GhostHunter.ps1
PowerShell
.\\Azure-LoadBalancer-GhostHunter.ps1 -SubscriptionIds "sub-123,sub-456"
PowerShell
.\\Azure-LoadBalancer-GhostHunter.ps1 -CsvPath "./reports/ghosts.csv" -HtmlPath "./reports/ghosts.html"

Ghost score interpretation

Score rangeClassificationRecommended action
80+Definite GhostValidate once, then prioritize for cleanup
60-79Likely GhostInvestigate config gaps before cleanup
40-59SuspiciousMonitor usage and confirm business intent
20-39Review NeededInspect config for optimization opportunities
0-19ActiveUsually retain unless other signals indicate waste

Report output highlights

The HTML/CSV reports include scoring and estimated cost so teams can prioritize remediation by financial impact.

ColumnExampleWhy it matters
GhostStatusDEFINITE GHOSTQuick triage for cleanup queues
GhostScore92Confidence score from multi-factor analysis
EstimatedMonthlyCost$22.56Savings prioritization
BackendPoolMembers0Strong signal of likely non-use

Troubleshooting

  • If no load balancers are returned, verify subscription scope and Reader access on `Microsoft.Network/loadBalancers`.
  • If ghost scores look unexpectedly low, review health probe and frontend IP configurations that can reduce the score.
  • If report files are missing, provide explicit `-CsvPath` / `-HtmlPath` values and confirm the directories exist.

Do not auto-delete on score alone

Ghost score is a prioritization signal, not a deletion approval. Validate ownership, recent traffic, and dependency context before cleanup.

Intelligent Ghost Detection

Advanced analysis and scoring system to identify unused Azure Load Balancers with precision

Ghost Scoring System

Intelligent scoring algorithm that analyzes multiple factors to determine ghost likelihood (0-100 scale)

Comprehensive Analysis

Analyzes backend pools, load balancing rules, NAT rules, frontend IPs, and health probes

Cost Estimation

Calculates monthly cost estimates based on load balancer SKU and configuration complexity

Status Classification

Categorizes load balancers as Definite Ghost, Likely Ghost, Suspicious, Review Needed, or Active

Multi-Subscription Support

Scans across multiple Azure subscriptions with proper authentication and access control

Health Probe Analysis

Evaluates health probe configurations to identify load balancers without proper health monitoring

Backend Pool Intelligence

Analyzes backend pool configurations and member counts to identify unused or empty pools

Detailed Reporting

Generates comprehensive CSV and HTML reports with ghost scores, cost estimates, and recommendations

Ghost Scoring Algorithm

Intelligent multi-factor analysis to determine load balancer utilization and ghost likelihood

Scoring Factors

Backend Pool Analysis (50 points)

  • • No backend pools configured (+50 points)
  • • All backend pools are empty (+45 points)
  • • Some backend pools are empty (+25 points)

Load Balancing Rules (30 points)

  • • No load balancing rules configured (+30 points)

Health Probes (20 points)

  • • No health probes configured (+20 points)

Additional Factors

  • • No inbound NAT rules (+10 points)
  • • No frontend IP configurations (+40 points)
  • • Unused frontend IP configurations (+15 points)

Ghost Classification

DEFINITE GHOST

Score ≥ 80

Load balancers with minimal or no configuration. Strong candidates for immediate cleanup.

LIKELY GHOST

Score ≥ 60

Load balancers with significant configuration gaps. Require investigation before cleanup.

SUSPICIOUS

Score ≥ 40

Load balancers with some concerning patterns. Monitor usage and validate necessity.

REVIEW NEEDED

Score ≥ 20

Load balancers with partial configuration. Review for optimization opportunities.

ACTIVE

Score < 20

Load balancers with comprehensive configuration. Likely serving active traffic.

Usage Examples

Real-world scenarios for Azure Load Balancer optimization and ghost detection

Complete Tenant Scan

.\Azure-LoadBalancer-GhostHunter.ps1

Scans all accessible subscriptions to identify ghost load balancers across your entire Azure tenant.

Targeted Subscription Analysis

.\Azure-LoadBalancer-GhostHunter.ps1 -SubscriptionIds "sub-123,sub-456"

Focuses analysis on specific subscriptions for targeted ghost hunting and cost optimization.

Custom Report Location

.\Azure-LoadBalancer-GhostHunter.ps1 -CsvPath"./reports/" -HtmlPath"./reports/"

Specifies custom output directories for CSV and HTML reports with organized file management.

Comprehensive Analysis

.\Azure-LoadBalancer-GhostHunter.ps1 -SubscriptionIds "prod-sub" -CsvPath"./audit/"

Performs detailed analysis of production subscription with audit-ready reporting for compliance.

Technical Specifications

Enterprise-grade PowerShell script with comprehensive Azure Load Balancer analysis capabilities

Requirements

PowerShell 5.1+

Modern PowerShell with Azure module support

Azure PowerShell Modules

Az.Accounts, Az.Network, Az.Resources modules installed

Azure Authentication

Valid Azure credentials with appropriate permissions

IAM Permissions

Reader role on target subscriptions and load balancer resources

Network Connectivity

Internet access to Azure management endpoints

Command Line Parameters

-CsvPath

Path for CSV export (default: timestamped file)

-HtmlPath

Path for HTML report (default: timestamped file)

-SubscriptionIds

Comma-separated subscription IDs to scan

Core Features

Analysis Engine

  • • Multi-factor ghost scoring algorithm (0-100 scale)
  • • Backend pool configuration analysis
  • • Load balancing rules evaluation
  • • Health probe configuration assessment

Cost Analysis

  • • Monthly cost estimation by SKU type
  • • Standard Load Balancer: $22.56 base cost
  • • Basic Load Balancer: $18.25 estimated cost
  • • Rule-based cost calculations with complexity factors

Reporting Capabilities

  • • Detailed CSV export with all metrics
  • • Rich HTML reports with visual styling
  • • Ghost status classification and recommendations
  • • Backend pool member count analysis

Enterprise Features

  • • Multi-subscription scanning with parallel processing
  • • Comprehensive error handling and logging
  • • CloudCostChefs professional styling and branding
  • • Detailed progress tracking and status updates

Comprehensive Reporting

Professional reporting in multiple formats with detailed analytics and actionable insights

CSV Data Export

Structured CSV export optimized for data analysis, filtering, and integration with business intelligence tools.

Load balancer configuration details
Ghost scores and status classifications
Monthly cost estimates and SKU information
Backend pool member counts and details
Resource group and subscription organization

HTML Executive Report

Rich HTML report with CloudCostChefs styling, ghost status visualization, and executive-friendly presentation.

Executive summary with key findings
Ghost status distribution with color coding
Cost impact analysis and potential savings
Detailed load balancer analysis tables
Professional CloudCostChefs branding and styling

Chef's Tips & Best Practices

Professional recommendations for effective Azure Load Balancer ghost hunting and optimization

Authentication Setup

Ensure proper Azure PowerShell authentication before running the script. Like prepping your kitchen, proper authentication ensures smooth ghost hunting operations.

Subscription Strategy

Start with non-production subscriptions to understand ghost patterns. Like tasting ingredients before the final dish, test your approach before production hunting.

Score Interpretation

Focus on"Definite Ghost" (80+) and"Likely Ghost" (60+) scores for immediate action. Like identifying overripe ingredients, high scores indicate clear cleanup candidates.

Cost Impact Analysis

Use cost estimates to prioritize cleanup efforts and calculate potential savings. Standard Load Balancers cost more than Basic, making them higher priority targets.

Stakeholder Communication

Use HTML reports for executive communication and CSV data for technical analysis. Present findings like a chef explaining the menu - clear, professional, and actionable.

Regular Monitoring

Schedule regular ghost hunting sessions to prevent accumulation of unused resources. Like maintaining a clean kitchen, regular monitoring prevents ghost buildup.

Ready to Hunt Azure Load Balancer Ghosts?

Download the Azure Load Balancer Ghost Hunter and start identifying unused load balancers consuming resources in your Azure environment. Professional ghost detection with intelligent scoring.

What to do next

Pick the path that fits where you are right now.

Trust & run-safety metadata

Key execution details for Azure Load Balancer Ghost Hunter so users know what they are downloading or running before they act.

Need verification guidance? See Security & Trust and Responsible Disclosure.

Read-only / reportingGitHub sourceExplicit + inferred metadata

Maintainer

CloudCostChefs

Last Updated

July 5, 2025

Last Tested

February 23, 2026

Minimum Access

Reader access to Azure subscriptions with Load Balancer and network metadata visibility

Execution Type

GitHub-hosted PowerShell reporting script (Azure load balancer ghost detection)

Version

2025-07-05

SHA256 Checksum

Not published yet (recommend adding checksum for downloadable files)

Verification Notes

GitHub-hosted network-cost reporting workflow. Review ghost scoring logic, subscription scope, and output handling before using findings for cleanup planning.

Safe Usage Checklist

  • Treat low-traffic load balancers as candidates, not auto-delete targets; confirm backend usage and maintenance windows first.
  • Run in a single subscription initially to validate report accuracy and performance.
  • Run in a non-production subscription/account/tenancy first and capture sample output before broader rollout.
  • Use least-privilege access. Current best hint from docs: Reader access to Azure subscriptions with Load Balancer and network metadata visibility.

Quick start (fast path)

Minimal steps to safely get value from this tool without reading the entire page first.

Estimated time: 10-15 minutes per subscriptionDifficulty: IntermediateAccess: Review / read-only
  1. 1. Confirm scope and permissions

    Use least privilege and test in a non-production scope first. Minimum access hint: Reader access to Azure subscriptions with Load Balancer and network metadata visibility.

  2. 2. Get the tool package / source

    View on GitHub and review the files before running.

    GitHub
  3. 3. Check prerequisites

    • ✅ PowerShell 5.1+ with Azure PowerShell modules and advanced cmdlets
    • ✅ Azure PowerShell modules installed (Az.Accounts, Az.Network, Az.Resources)
    • ✅ Azure authentication configured with appropriate permissions
  4. 4. Run safely and review output

    GitHub-hosted network-cost reporting workflow. Review ghost scoring logic, subscription scope, and output handling before using findings for cleanup planning. Start with a small sample scope, then expand once results look correct.