Forum Discussion

Pn1995's avatar
Pn1995
Brass Contributor
Apr 11, 2019

List all Office365 Groups and Distribution Lists that has a certain domain

Hi

 

We have Office365 and have multiple domains attached to it

 

We want to be able to run a script that lists all the Office365 groups and distribution lists that have this domain attached to it

 

Anyone know what command we need to run

 

Cheers

  • Easiest way is via the Get-AzureADDomainNameReference cmdlet:

     

    Get-AzureADDomainNameReference -Name domain.com | ? {$_.ObjectType -eq "Group"}

     

    The of course it depends on the definition of group, the definition of "attached to", and so on...

Resources