List all Corporate Contacts and Distribution Lists they belong to

There are times when your company needs to keep a list of Corporate Contacts that are used by your own users on a daily basis. You can find them in Microsoft 365 Admin Center - Users - Contacts or Exchange Admin Center - Recipients - Contacts. It gets more complicated when those contacts are added to several Distribution Lists, more so when they are mixed with your users. The issue is that unlike working with Internal Users, you cannot open a contact and see which groups it belongs to. This is where PowerShell comes handy. The script below finds every single contact and all groups it belongs to (if any). To show the result I use a Grid View (Out-GridView) because it provides an easy column sorting and filtering. This script might help to find a user error if some contact should or should not be in a group. Side…

Continue ReadingList all Corporate Contacts and Distribution Lists they belong to