Link to home
Start Free TrialLog in
Avatar of ddiazp
ddiazpFlag for Canada

asked on

Exchange Command [EASY]

So I have to execute this command:

Set-Mailbox -Identity "ADGroup" -RequireSenderAuthenticationEnabled $false

For everyone of my distribution lists.

Is there a wildcard I can use or do I have to come up with a script that will query AD for distribution lists and then use a loop to execute this command to all?

Avatar of Suliman Abu Kharroub
Suliman Abu Kharroub
Flag of Jordan image

Had not test it, but it should work:

Get-DistributionGroup | Set-Mailbox -Identity "ADGroup" -RequireSenderAuthenticationEnabled $false
Avatar of ddiazp

ASKER

"ADGroup" is where each DL should be specified, command doesn't work.

Any other suggestions?
That should do it.
$DLs = Get-DistributionGroup -ResultSize unlimited
foreach ($DL in $DLS){Set-DistributionGroup $DL.Name -RequireSenderAuthenticationEnabled:$False}

Open in new window

Avatar of ddiazp

ASKER

Awesome, will try that shortly. Can we output to a text file each DL it applies the changes to?

Something like echo/print $DLs > list.log     or something ?
ASKER CERTIFIED SOLUTION
Avatar of Dan Arseneau
Dan Arseneau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ddiazp

ASKER

Thank you sir, worked great.