Skip to content

ImYourBoyRoy/powercli-esxi-upgrade-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ ESXi Upgrade Readiness Check

PowerShell 5.1+ VMware PowerCLI Made with PowerShell

πŸ” Comprehensive assessment tool for ESXi host upgrade readiness with detailed reporting and recommendations!


✨ Features

πŸ—οΈ Comprehensive Analysis

  • CPU compatibility verification
  • Storage capacity assessment
  • Upgrade path determination
  • System readiness evaluation

πŸ“Š Advanced Reporting

  • Interactive HTML reporting with filtering
  • Detailed CSV export for data analysis
  • Clear status categorization
  • Actionable upgrade recommendations

πŸ”„ Efficient Processing

  • Parallel host processing
  • Configurable concurrency
  • Progress tracking
  • Detailed logging and error handling

πŸ›‘οΈ Version Intelligence

  • Precise version and build tracking
  • Target version specification
  • Upgrade path validation
  • Already up-to-date detection

🎯 Prerequisites

Before you begin your upgrade assessment, ensure you have:

  • πŸ’» PowerShell 7 or higher
  • πŸ”Œ VMware PowerCLI module installed
  • πŸ”‘ ESXi host credentials with administrative access
  • πŸ“„ (Optional) CSV file with host inventory

πŸš€ Quick Start

1️⃣ Setup

Click to expand PowerCLI setup instructions

Install Powershell 7+ via Winget πŸ’»

# Install PowerShell 7+ via winget
winget install Microsoft.PowerShell

Install PowerCLI πŸ”Œ

# Install VMware PowerCLI module if not already installed
Install-Module -Name VMware.PowerCLI -Scope CurrentUser -Force

Configure PowerCLI Settings πŸ”§

# Set PowerCLI configuration
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP $false -Confirm:$false

2️⃣ Configuration

Create a config.json file in the same directory as the script:

Click to see full config.json template
{
    "Username": "administrator@vsphere.local",
    "Password": "YourSecurePassword",
    "TargetESXiVersion": "8.0.3",
    "MinimumRequiredSpaceGB": 10,
    "MinimumBootbankFreePercentage": 90
}

3️⃣ Run the Assessment

# Check specific servers
.\ESXi-Upgrade-ReadinessCheck.ps1 -Servers "esxi01.domain.com","esxi02.domain.com"

# Check servers from CSV file with parallel processing
.\ESXi-Upgrade-ReadinessCheck.ps1 -ServerListFile "servers.csv" -Parallel -MaxConcurrentJobs 10

βš™οΈ Usage Options

# Show help and parameter information
.\ESXi-Upgrade-ReadinessCheck.ps1 -Help

# Check specific ESXi hosts
.\ESXi-Upgrade-ReadinessCheck.ps1 -Servers "esxi01.domain.com","esxi02.domain.com"

# Process hosts from a CSV file
.\ESXi-Upgrade-ReadinessCheck.ps1 -ServerListFile "servers.csv"

# Specify output locations for CSV and HTML report
.\ESXi-Upgrade-ReadinessCheck.ps1 -Servers "esxi01.domain.com" -OutputCsv "results.csv" -ReportPath "report.html"

# Process multiple hosts in parallel with custom concurrency
.\ESXi-Upgrade-ReadinessCheck.ps1 -ServerListFile "servers.csv" -Parallel -MaxConcurrentJobs 10

# Specify target ESXi version to check compatibility against
.\ESXi-Upgrade-ReadinessCheck.ps1 -ServerListFile "servers.csv" -UpgradeVersion "8.0.3"

# Filter servers by name match (e.g., only include hosts with "ESX" in their name)
.\ESXi-Upgrade-ReadinessCheck.ps1 -ServerListFile "servers.csv" -NameMatch "ESX"

# Combine filters, parallelism, and output control
.\ESXi-Upgrade-ReadinessCheck.ps1 -ServerListFile "servers.csv" -NameMatch "CHQ" -Parallel -MaxConcurrentJobs 8 -OutputCsv "filtered-results.csv" -ReportPath "filtered-report.html"

πŸ“Š Report Output

The script produces two main outputs:

1️⃣ Interactive HTML Report

  • Filterable host list
  • Status categorization
  • Detailed host information
  • Visual status indicators
  • Upgrade recommendations

HTML Report Example

2️⃣ Detailed CSV Export

  • Complete assessment data
  • Sortable and filterable in Excel
  • Perfect for inventory management
  • Integration with other systems

πŸ” Host Categories

Hosts are categorized for easy assessment:

  • βœ… Ready for Upgrade: Meets all requirements
  • πŸ”„ Already Up-To-Date: Running target version
  • ❌ CPU Incompatible: CPU not supported
  • ⚠️ Storage Issues: Insufficient space
  • πŸ”„ Requires Intermediate Upgrade: Multi-step upgrade needed
  • ❓ Multiple Issues: Multiple requirements not met
  • ⚠️ Failed to Check: Connection or assessment error

πŸ› οΈ Troubleshooting

πŸ”Œ Connection Issues
  • βœ“ Verify hostname/IP is correct
  • βœ“ Check network connectivity
  • βœ“ Verify credentials
  • βœ“ Ensure ESXi host is online
  • βœ“ Check firewall rules
πŸ“ˆ Performance Issues
  • βœ“ Reduce MaxConcurrentJobs
  • βœ“ Check host resource utilization
  • βœ“ Process smaller batches of hosts
πŸ“‹ CSV Import Issues
  • βœ“ Verify CSV format
  • βœ“ Ensure "Host Name" column exists
  • βœ“ Check for valid ESXi hostnames

πŸ“œ Security Considerations

  • πŸ”’ Store credentials securely
  • πŸ”‘ Use least-privilege accounts
  • πŸ“ Review logs regularly
  • πŸ” Don't hardcode credentials in script

πŸ“‹ License

This project is made available under the MIT License.

πŸ’¬ Support

Have questions or feedback? Found a bug? Please open an issue in the repository.


Made with ❀️ for VMware administrators


⭐ Star this repository if you find it helpful! ⭐

About

Powershell tool to assess ESXi hosts for upgrade readiness with detailed reporting and recommendations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors