Export Microsoft 365 distribution group members to CSV with PowerShell
There are many distribution groups, and we like to get all the members and owners. We can go through the groups in the Microsoft 365 admin center individually, but that takes a lot of time. So let's automate the task…