Ernesto Gallardo
asked on
How to get all Distribution Groups where a security Group is configured as Allowed to send
Hi,
I'm migrating security groups to O365 and I need a script that could give me all the distribution Groups where "securitygroupX " is configured as the only group allowed to send to them (AcceptMessagesOnlyFromDLM embers)
Thanks,
I used this , but it returned an empty file:
Get-DistributionGroup |Where-Object {$_.AcceptMessagesOnlyFrom DLMembers -eq "BarryAdvisors-Senders"} | Export-csv C:\DG-Migration\BAS.csv
I'm migrating security groups to O365 and I need a script that could give me all the distribution Groups where "securitygroupX " is configured as the only group allowed to send to them (AcceptMessagesOnlyFromDLM
Thanks,
I used this , but it returned an empty file:
Get-DistributionGroup |Where-Object {$_.AcceptMessagesOnlyFrom
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Adam,
It worked at the end, for most of the groups.
It worked at the end, for most of the groups.
ASKER
PS C:\DG-Migration> Get-DistributionGroup |Where-Object {$_.AcceptMessagesOnlyFrom
sv
WARNING: By default, only the first 1000 items are returned. Use the ResultSize parameter to specify the number of items returned. To return all items, specify
"-ResultSize Unlimited". Be aware that, depending on the actual number of items, returning all items can take a long time and consume a large amount of memory. Also,
we don't recommend storing the results in a variable. Instead, pipe the results to another task or script to perform batch changes.
PS C:\DG-Migration>