Changing DL setting for every DL in the company?

Copper Contributor

A company I am working for recently split in half.  As part of that all of the DL's were brought over from one exchange system to the other.  The email accounts are in the process of being moved over, but most of the people are still using the old email system.


Needless to say, that causes a variety of problems.  Not the least of which is that all of the new DL's, (same name, just new domain name), are all defaulted to not accept emails from outside the domain, of which half the users are since they are still using the old domain name.


As people put in tickets for problems I've been manually updating them one by one.  The problem is that there are several hundred of them.  I'd like to update every one of them to accept email from outside the domain via powershell, but I'm a little leery of doing that.   It seems a dangerous command, and I have zero way to test it before hand, and I'm not even remotely a PS guru.


Can someone give me a command that would do that?  I'll have to run it up the flagpole and get a bunch of managers to sign off on doing it, but it would save me, (and the end users),  a boatload of time if I could make it happen.





1 Reply

You can simply preview the result of the cmdlet execution by using the -WhatIf switch. Not all cmdlets support it though, so be careful. Anyway, here's an example that updates all groups to allow external senders:


Get-DistributionGroup | Set-DistributionGroup -RequireSenderAuthenticationEnabled $false


If you want to run it against a subset of the groups, use the filter parameter or import the list of groups from CSV, etc.