This PowerShell script provides a comprehensive solution for analyzing and reporting user access within Microsoft Exchange Online. It automates the discovery of Distribution Group memberships and Shared Mailbox permissions for specified users, making it an invaluable tool for IT administrators, security teams, and compliance officers.
How It Works The script performs the following operations:
Exports Exchange Online Resources:
Retrieves all Distribution Groups and exports them to a CSV Retrieves all Shared Mailboxes and exports them to a CSV Processes User Aliases:
Imports user aliases from a provided CSV file Resolves each alias to discover all associated email addresses Creates a comprehensive mapping of users and their email identities Analyzes Group Memberships and Mailbox Permissions:
Identifies Distribution Group memberships for each user Discovers Shared Mailbox permissions for each user Provides real-time console feedback with color coding for easy monitoring Signals when matches are found with audio alerts Generates Detailed Reports:
Creates individual CSV reports for each user showing their specific access Produces consolidated reports for organization-wide analysis Exports alias resolution details for verification Why Use This Script Simplifies Auditing: Automates the otherwise tedious process of checking mailbox permissions and group memberships. Migration Planning: Essential for planning user migrations or transitions. Offboarding Assistance: Helps ensure all access is properly transferred when users leave. Security Reviews: Quickly identify who has access to which resources. Compliance Support: Generate documentation for compliance audits. Robust Error Handling: Built-in safeguards to handle exceptions gracefully. Visual Feedback: Clear console output helps monitor progress in real-time. This script saves hours of manual work by automating the discovery and documentation of Exchange Online access permissions, making it an essential tool for any organization managing Microsoft 365 environments.
Download and run 'updatedlANDmbx.ps1' once you have authenticated and loaded exchangeonlinemanagment module for powershell v7+ an example of the input file is found as users.csv
verify the code and use at your own risk.
This PowerShell script writes the given text in uppercase letters.
text Specifies the text to write (ask user by default)
PS> ./write-uppercase.ps1 "Hello World"HELLO WORLDAuthor: Markus Fleschutz | License: CC0
This PowerShell script writes the given text with the typewriter effect.
text Specifies the text to write (sample text by default)
speed Specifies the speed (200 ms by default)
PS> ./write-typewriter.ps1 "Hello World"Author: Markus Fleschutz | License: CC0
This PowerShell script queries the current time and writes it in US format to the console.
PS> ./write-time.ps1🕒7:20 PMAuthor: Markus Fleschutz | License: CC0
This PowerShell script writes sine curves.
PS> ./write-sine-curvesAuthor: Markus Fleschutz | License: CC0
This PowerShell script writes text encoded or decoded with ROT13.
text Specifies the text to write
PS> ./write-rot13 "Hello World"Author: Markus Fleschutz | License: CC0
This PowerShell script calculates and writes the digits of the mathematical constant PI.
digits Specifies the number of digits to list (1000 by default)
PS> ./write-pi.ps13.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342...Author: Markus Fleschutz | License: CC0
This PowerShell script writes the given text in Morse code.
text Specifies the text to write
speed Specifies the speed of one time unit (100 ms per default)
PS> ./write-morse-code ABC● ― ― ● ● ● ― ● ― ●Author: Markus Fleschutz | License: CC0
This PowerShell script writes the current moon phase to the console.
PS> ./write-moon.ps1Author: Markus Fleschutz | License: CC0
This PowerShell script writes the given text in lowercase letters.
text Specifies the text to write
PS> ./write-lowercase "Hello World"hello worldAuthor: Markus Fleschutz | License: CC0