This PowerShell script provides a streamlined way to audit the transport settings in Microsoft Exchange Online. It connects to the Exchange Online environment, compares current transport configuration settings with predefined compliance standards, and generates an interactive HTML report. This solution is valuable for administrators needing to assess compliance and configuration efficacy based on security standards, including NIS2, CER, and AVG guidelines.

Key Features of the Script

1. Automated Connection and Report Generation

  • Exchange Online Integration

The script uses the ExchangeOnlineManagement

PowerShell module to connect and retrieve the current transport settings.

  • Automated Installation

If the module isn’t installed, the script installs it and proceeds to connect.

  • User Input

The UPN parameter allows specifying a User Principal Name for connection.

2. Normalization and Compliance Checking

  • **Normalization of Size Values: **Converts configuration values like “GB” or “MB” to bytes for accurate comparison.

  • Predefined Compliance Benchmarks: Each setting is compared against baseline values derived from security guidelines:

  • **NIS2: **Network and Information Security Directive guidelines.

  • **CER: **Cyber Essentials Requirements.

  • **AVG: **Data protection and privacy insights.

  • **Non-compliance Indicators: **Settings deviating from desired values are highlighted, helping users identify where adjustments are needed.

3. HTML Report with Interactive Filters

  • **Progress Indicators: **A visual progress bar reflects the overall compliance percentage, calculated based on the ratio of compliant settings to total settings.

  • **Impact Levels: **Each setting is classified by impact (Critical, High, Medium, Low, None).

  • **Filter and Sort Capabilities: **Users can filter the report by categories, such as security settings, user experience, recommended settings, etc.

  • **Difference Toggle: **Users can view only the settings that deviate from the recommended values.

4. User-Friendly Output

  • **HTML Format with CSS and JavaScript: **The generated HTML includes CSS for a polished layout and JavaScript for interactive functionality.

  • **Version and Author Details: **A modal dialog within the report provides details about the script version and author.

How to Use the Script

  1. Run the Script: To execute, use: powershellCopy code.\get_Transportconfig.ps1 -UPN ‘yourname@domain.com

  2. View the Report: Once generated, the HTML report will automatically open in the default web browser. You can also print the report to PDF.

  3. Interpret the Results:

  • Settings are organized into a table with current and desired values.

  • Use the filters to focus on specific compliance areas, such as security or user experience.

  • Critical issues are marked, helping prioritize settings that need immediate attention.

  1. Disconnect: The script concludes by disconnecting the Exchange Online session, ensuring secure closure of the connection.