Combining PowerShell Cmdlets
Published: November 17, 2021 | Last Modified: May 13, 2025
Tags: azure reports active directory ExchangeOnlineManagement
Categories: PowerShell
I found myself in a situation where I needed to generate a report to troubleshoot an email issue for a client. Some data could only be retrieved from the ExchangeOnlineManagement module, and other data only from the AzureAD module. This PowerShell script demonstrates one solution of using both modules in tandem with a nested for-loop that compares the UserPrincipalName with every iteration.