Skip to content
cnschindlerPublic

About

Exchange Load Imitator (for on-prem)

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

πŸš€ Exchange Load Imitator v1.7.6 RTC (Release To Community)

Community-focused Exchange infrastructure testing platform - A powerful PowerShell-based tool for testing Exchange servers and Microsoft 365 environments with comprehensive protocol support and modern authentication capabilities.

🌟 Welcome to the First RTC Release!

Exchange Load Imitator v1.7.6 marks our first Release To Community (RTC) - a stable, production-ready version designed for IT professionals, system administrators, and Exchange engineers who need reliable load testing capabilities.

οΏ½ What's New in v1.7.6 RTC

πŸ”„ EWS & Microsoft Graph Protocol Switching

  • Smart protocol detection between EWS and Microsoft Graph APIs
  • Modern REST API support for M365 Calendar operations
  • Automatic fallback mechanisms for optimal performance
  • OAuth2 authentication for Graph API integration

πŸ–₯️ Enhanced GUI Experience

  • Reorganized Exchange protocol tabs for better usability
  • "Use REST/Graph for Calendar" option in MAPI configuration
  • Improved protocol selection and validation
  • Streamlined user interface design

⚑ Core Capabilities

  • Multiple Protocols: SMTP, HTTP, POP3, IMAP, EWS, ActiveSync, MAPI/HTTP
  • Modern Authentication: OAuth2, certificate-based, and legacy authentication
  • Real-time Monitoring: Live performance metrics and CSV logging
  • Business Hours Simulation: Realistic load patterns throughout the day
  • Thread-safe Operations: Concurrent protocol testing with proper synchronization
  • Streaming Analytics: Sub-second performance monitoring with real-time processing
  • Capacity Planning: AI-driven recommendations for infrastructure scaling
  • SLA Monitoring: Service level agreement tracking with violation alerts
  • Custom Dashboards: Configurable monitoring for different enterprise stakeholders

🎯 Perfect For

  • Enterprise Migrations: Large-scale Office 365 migration validation with AI optimization
  • Infrastructure Planning: AI-powered Exchange server capacity and performance planning
  • Security Validation: Zero-trust authentication method testing and verification
  • User Experience Optimization: Revolutionary user behavior simulation with predictive analytics
  • Performance Engineering: Ultra-advanced workload characterization and bottleneck elimination
  • Compliance Testing: Automated compliance and audit trail generation
  • Cloud-Native Deployments: Modern cloud-scale Exchange environment validation

⚑ Ultra Quick Start

πŸ–₯️ Revolutionary GUI Experience (Recommended)

# Launch the Ultra GUI with AI-enhanced interface
& .\scripts\ExchangeSE-LoadImitator-GUI.ps1

οΏ½ Quick Start Guide

πŸ“₯ Installation

# Clone the repository
git clone https://github.com/Lunik76/ELI.git
cd ELI

# Import the LoadGen module
Import-Module .\src\LoadGen\LoadGen.psm1 -Force

🎯 Basic Usage

# Simple SMTP load test
Start-LoadTest -Protocol SMTP -Url "mail.contoso.com" -Port 25 -Username "test@contoso.com" -Password "password" -ConcurrentThreads 3 -MessagesPerThread 5 -LogPath ".\logs\smtp_test.csv"

# EWS with Calendar protocol switching
Start-LoadTest -Protocol Calendar -Url "https://outlook.office365.com" -Username "user@contoso.com" -Password "password" -UseGraphForCalendar $true -ConcurrentThreads 2 -MessagesPerThread 10 -LogPath ".\logs\calendar_test.csv"

πŸ–₯️ GUI Interface

# Launch the graphical interface
.\scripts\ExchangeSE-LoadImitator-GUI.ps1

πŸ“‹ Supported Protocols

πŸ“§ Core Protocols

  • SMTP: Email delivery and transport testing
  • HTTP: Web service and API endpoint validation
  • POP3/IMAP: Mailbox access and synchronization

πŸ”„ Exchange Protocols

  • EWS (Exchange Web Services): Complete operations suite including calendar, email, and folder management
  • ActiveSync: Mobile device synchronization with WBXML support
  • MAPI/HTTP: Modern Exchange mailbox access protocol
  • Calendar: Smart switching between EWS and Microsoft Graph APIs for optimal M365 integration

πŸ” Authentication Support

  • Basic Authentication: Traditional username/password
  • OAuth2: Modern token-based authentication for Microsoft 365
  • Certificate-Based: Smart card and certificate authentication
  • Graph API: Microsoft Graph REST API with automatic token management

πŸ’‘ Usage Examples

πŸ”„ Calendar Protocol Switching

# Test both EWS and Graph API for Calendar operations
Start-LoadTest -Protocol Calendar -Url "https://outlook.office365.com" -Username "user@contoso.com" -Password "password" -UseGraphForCalendar $true -ConcurrentThreads 3 -MessagesPerThread 5 -LogPath ".\logs\calendar_graph.csv"

# EWS-only Calendar testing
Start-LoadTest -Protocol Calendar -Url "https://outlook.office365.com" -Username "user@contoso.com" -Password "password" -UseGraphForCalendar $false -ConcurrentThreads 3 -MessagesPerThread 5 -LogPath ".\logs\calendar_ews.csv"

πŸ“§ Multi-Protocol Testing

# SMTP load test
Start-LoadTest -Protocol SMTP -Url "mail.contoso.com" -Port 25 -From "sender@contoso.com" -To "recipient@contoso.com" -ConcurrentThreads 5 -MessagesPerThread 10 -LogPath ".\logs\smtp.csv"

# EWS operations test
Start-LoadTest -Protocol EWS -Url "https://mail.contoso.com/EWS/Exchange.asmx" -Username "user@contoso.com" -Password "password" -ConcurrentThreads 3 -MessagesPerThread 8 -LogPath ".\logs\ews.csv"

# ActiveSync mobile simulation
Start-LoadTest -Protocol ActiveSync -Url "https://mail.contoso.com" -Username "user@contoso.com" -Password "password" -ConcurrentThreads 2 -MessagesPerThread 15 -LogPath ".\logs\activesync.csv"

⏰ Business Hours Simulation

# Enable realistic business hours load distribution
Start-LoadTest -Protocol EWS -Url "https://mail.contoso.com/EWS/Exchange.asmx" -Username "user@contoso.com" -Password "password" -ConcurrentThreads 4 -MessagesPerThread 20 -UseBusinessHours $true -LogPath ".\logs\business_hours.csv"

πŸ“Š Logging and Analysis

CSV Output Format

All tests generate CSV files with standardized columns for easy analysis:

TestRunId,Timestamp,Protocol,ThreadId,MessageIndex,Result,LatencyMs,Error,Server,Port

Power BI Integration

The CSV format is optimized for Power BI consumption, enabling:

  • Performance trend analysis
  • Protocol comparison dashboards
  • Latency distribution charts
  • Success rate monitoring

Real-time Monitoring

# Monitor test progress
Get-LoadStatus

# Pause/Resume tests
Suspend-LoadTest
Resume-LoadTest

# Stop all tests
Stop-LoadTest

πŸ› οΈ Configuration Options

πŸ“§ SMTP Configuration

  • Server: Mail server hostname (default: localhost)
  • Port: SMTP port (default: 25, SSL: 587/465)
  • Authentication: Username/password (optional)
  • Recipients: Semicolon-delimited recipient list
  • Message Size: Configurable payload size in KB

🌐 HTTP/Web Configuration

  • URL: Target endpoint URL
  • Method: GET or POST operations
  • Payload: Configurable request size for POST
  • Pacing: Delay and jitter controls for realistic timing

πŸ“± Exchange Protocols

  • EWS: Exchange Web Services with SOAP operations
  • ActiveSync: Mobile device synchronization simulation
  • MAPI/HTTP: Modern Exchange mailbox access
  • Calendar: EWS/Graph API switching with OAuth2 support

⏰ Business Hours Simulation

Enable realistic load patterns throughout the day:

  • Peak hours (9-12, 14-17): 100% load
  • Morning/Evening (6-8, 18-19): 50% load
  • Lunch hour (13): 70% load
  • Night hours (0-5, 20-23): 10% load

πŸ“ˆ Power BI Integration

Import CSV logs directly into Power BI for comprehensive analysis:

let
    Source = Csv.Document(File.Contents("C:\\logs\\loadgen.csv"), [Delimiter=",", Columns=10, Encoding=65001]),
    PromoteHeaders = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
    ChangeTypes = Table.TransformColumnTypes(PromoteHeaders, {
        {"TestRunId", type text},
        {"Timestamp", type datetime},
        {"Protocol", type text},
        {"ThreadId", Int64.Type},
        {"MessageIndex", Int64.Type},
        {"Result", type text},
        {"LatencyMs", Int64.Type},
        {"Error", type text},
        {"Server", type text},
        {"Port", Int64.Type}
    })
in
    ChangeTypes

πŸ§ͺ Development & Testing

Running Tests

# Execute Pester tests
Invoke-Pester -Path .\tests -Output Detailed

# Force reload module during development
Import-Module .\src\LoadGen\LoadGen.psm1 -Force

Contributing

  • PowerShell 7+: Required for Start-ThreadJob support
  • Windows Platform: Designed for Windows environments
  • Modular Design: Easy to extend with new protocols
  • Thread Safety: Built-in synchronization and logging protection

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

🀝 Community Support

  • GitHub Issues: Report bugs and request features
  • Discussions: Share use cases and best practices
  • Contributions: Pull requests welcome for protocol additions and improvements

Exchange Load Imitator v1.7.6 RTC - Built by the community, for the community. πŸš€ $config = @{ Url='https://example.com'; Method='GET'; NumThreads=5; MessagesPerThread=20; DelayMs=50; JitterPercent=10 } Start-LoadTest -Protocol HTTP -Config $config -LogPath $log | Out-Null


Run with duration limit and business hours simulation (console)

```powershell
Import-Module .\src\LoadGen\LoadGen.psm1 -Force
$log = Join-Path (Get-Location) 'logs\loadgen.csv'
Initialize-Logger -LogPath $log
$config = @{ Url='https://example.com'; Method='GET'; NumThreads=5; MessagesPerThread=999999 }  # High count for continuous run
# Run for 2 hours with business hours pattern
Start-LoadTest -Protocol HTTP -Config $config -LogPath $log -DurationMinutes 120 -UseBusinessHours $true | Out-Null

Pause/Resume and Stop (applies to all running protocols in the session)

Suspend-LoadTest
Resume-LoadTest
Stop-LoadTest

Power BI

You can import the CSV into Power BI and group by TestRunId to isolate a single run. Suggested fields/types:

  • Timestamp: datetime
  • Protocol: text
  • ThreadId, MessageIndex: whole number
  • Result: text
  • LatencyMs: whole number
  • Error, Server: text; Port: whole number

Optional Power Query (M) starter to load the CSV:

let
	Source = Csv.Document(File.Contents("C:\\path\\to\\logs\\loadgen.csv"),[Delimiter=",", Columns=10, Encoding=65001, QuoteStyle=QuoteStyle.None]),
	PromoteHeaders = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
	ChangeTypes = Table.TransformColumnTypes(PromoteHeaders,{
		{"TestRunId", type text},{"Timestamp", type datetime},{"Protocol", type text},{"ThreadId", Int64.Type},
		{"MessageIndex", Int64.Type},{"Result", type text},{"LatencyMs", Int64.Type},{"Error", type text},{"Server", type text},{"Port", Int64.Type}
	})
in
	ChangeTypes

Tips

  • Use Delay/Jitter to avoid synchronized spikes and better mimic real clients.
  • When testing secure POP/IMAP, enable Use SSL and verify ports (995 for POP3S, 993 for IMAPS).
  • Treat 401 (unauthorized) on Exchange endpoints as β€œreachable but requires auth,” which is still a valid connectivity check.

Development / Tests

  • Tests live in tests/ (Pester v5). Run locally:
Invoke-Pester -Path .\tests -Output Detailed
  • CI: GitHub Actions workflow .github/workflows/pester.yml runs tests on pushes and PRs.

About

Exchange Load Imitator (for on-prem)

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages