Apr 11 2019 05:50 AM
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
Apr 11 2019 09:32 AM
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...