An Exchange Troubleshooting PowerShell Tool for IT Administrators

Troubleshoot Exchange connectivity issues with this comprehensive PowerShell script that tests all major Exchange protocols and generates professional HTML reports.

What is the Exchange Connectivity Tester?

The Exchange Connectivity Tester is a PowerShell script designed to help IT administrators and support technicians quickly diagnose Exchange connectivity issues. Just like Microsoft Outlook automatically detects and connects to Exchange services, this script performs comprehensive connectivity tests across all major Exchange protocols and presents the results in a clear, professional HTML report.

Tip: This script behaves exactly like Outlook’s connection process, making it the perfect tool for troubleshooting why Outlook might not be connecting properly to your Exchange environment.

Why Do You Need This Tool?

Every IT administrator has faced the dreaded “Outlook won’t connect” support ticket. Instead of spending hours manually testing different connection methods, this script automates the entire process and provides you with actionable insights in minutes.

Automatic Detection

Automatically detects whether you’re using Exchange Online or on-premises Exchange Server, just like Outlook does.

Comprehensive Testing

Tests all major Exchange protocols in the same order and manner that Outlook uses for connections.

Professional Reports

Generates beautiful HTML reports that you can share with colleagues or include in support tickets.

⚡ Real-time Feedback

See exactly what the script is doing with color-coded console output and progress indicators.

What Protocols Does It Test?

The script tests all the same protocols that Outlook uses to connect to Exchange, ensuring comprehensive coverage:

Autodiscover

The foundation of Exchange connectivity – tests multiple Autodiscover URLs

MAPI over HTTP

Modern protocol used by Outlook 2013+ and Exchange Online

RPC over HTTP

Legacy protocol for older Exchange versions and Outlook clients

Exchange Web Services

API used by mobile devices and third-party applications

Outlook Web Access

Web interface for browser-based email access

Offline Address Book

Directory synchronization for offline Outlook functionality

Real-World Use Cases

Here are some practical scenarios where this script becomes invaluable:

Help Desk Troubleshooting

Scenario: User calls saying “Outlook won’t connect” after a recent office move.

Solution: Run the script on the user’s computer to quickly identify if it’s a network, DNS, or Exchange configuration issue. The HTML report provides clear evidence of what’s working and what’s not.

Office 365 Migration

Scenario: You’re migrating from on-premises Exchange to Exchange Online and need to verify connectivity.

Solution: Use the script before and after migration to document connectivity status and ensure all protocols are working correctly in the new environment.

New Employee Onboarding

Scenario: Setting up a new employee’s computer and want to verify Exchange connectivity before they start.

Solution: Run the script as part of your standard setup process to proactively identify and resolve any connectivity issues.

Mobile Device Issues

Scenario: Users report that their mobile devices can’t sync email, but Outlook works fine.

Solution: The script tests EWS (Exchange Web Services), which is used by mobile devices, helping you isolate mobile-specific connectivity problems.

Network Infrastructure Changes

Scenario: After firewall or proxy changes, some users report intermittent Outlook connectivity issues.

Solution: Run the script from different network segments to identify which protocols are being blocked and where.

How to Use the Script

Using the Exchange Connectivity Tester is straightforward and user-friendly:

Step 1: Download and Prepare

  1. Download the ConnectivityTester.ps1 script
  2. Open PowerShell as Administrator (recommended for full functionality)
  3. Navigate to the script location

Step 2: Execute the Script

.\ConnectivityTester.ps1

Step 3: Follow the Interactive Prompts

  • Email Detection: The script will try to detect your email from Outlook automatically
  • Manual Input: If auto-detection fails, you’ll be prompted to enter your email address
  • Save Location: Choose where to save the HTML report using the file dialog

Step 4: Monitor Progress

Watch the real-time console output as the script tests each protocol:

=== Testing Autodiscover ===
Testing: https://autodiscover.company.com/autodiscover/autodiscover.xml
[Success] Autodiscover
Details: Autodiscover successful via: https://autodiscover.company.com/autodiscover/autodiscover.xml=== Testing MAPI over HTTP ===
[Success] MAPI over HTTP
Details: MAPI over HTTP endpoint is accessible: https://outlook.office365.com/mapi/emsmdb

Step 5: Review the HTML Report

The script generates a comprehensive HTML report with:

  • Executive Summary: Quick overview of test results with visual statistics
  • Detailed Results: Complete information for each protocol test
  • Error Details: Specific error messages for troubleshooting
  • Environment Information: Computer, user, and Exchange details

Professional HTML Report Preview

The generated report includes color-coded results, detailed error messages, and a clean, professional layout perfect for sharing with colleagues or including in support documentation.

Benefits for IT Teams

Time Savings

Instead of manually testing each protocol and connection method, the script automates the entire process. What used to take 30-60 minutes of manual testing now takes just 2-3 minutes.

Standardized Troubleshooting

Ensure consistent troubleshooting across your IT team. Every technician gets the same comprehensive test results, reducing the chance of missing important connectivity issues.

Professional Documentation

The HTML reports provide professional documentation that can be:

  • Attached to support tickets
  • Shared with Microsoft support
  • Included in incident reports
  • Used for compliance documentation

Proactive Monitoring

Run the script regularly as part of your monitoring routine to catch connectivity issues before users report them.

Understanding the Results

The script provides clear, actionable results for each test:

✅ Success Status

Green indicators show that the protocol is working correctly and accessible from the client computer.

❌ Failed Status

Red indicators highlight protocols that are not working, with specific error messages to help identify the root cause.

⚠️ Warning Status

Yellow indicators show protocols that are deprecated or not applicable to your environment (e.g., RPC over HTTP in Exchange Online).

️ Advanced Features

Automatic Environment Detection

The script intelligently determines whether you’re using:

  • Exchange Online: Based on MX records and domain analysis
  • Exchange Server: On-premises installations
  • Hybrid Environments: Mixed configurations

Email Auto-Detection

Automatically detects the user’s email address from:

  • Outlook MAPI profiles
  • Registry settings
  • User input as fallback

Customizable Reports

The HTML reports are fully customizable and include:

  • Responsive design for mobile and desktop viewing
  • Print-friendly formatting
  • Professional styling suitable for client presentations

Additional Resources

  • PowerShell Requirements: Works with PowerShell 5.1+ on Windows 10/11 and Windows Server
  • Permissions: Administrator privileges recommended for full functionality
  • Network Requirements: Internet access for Exchange Online testing
PowerShell
Exchange Server
Exchange Online
Office 365
Outlook
IT Administration
Troubleshooting
Network Connectivity
MAPI
Autodiscover

About This Tool

The Exchange Connectivity Tester was developed to address the common challenge of diagnosing Exchange connectivity issues quickly and comprehensively. It combines years of Exchange troubleshooting experience into a single, easy-to-use PowerShell script.

Version: 1.0 | Compatibility: Exchange 2010+ and Exchange Online | Platform: Windows PowerShell 5.1+