Link to home
Start Free TrialLog in
Avatar of Todd Mostowy
Todd MostowyFlag for United States of America

asked on

modify Exchange Dynamic Dist List using EMS to ignore hidden mailboxes

So I need to tell all my dynamic dist lists to ignore hidden mailboxes.  I ran these tests.  Below, #1 did not work, #2 did (for creation).  See #3 below and help me get the correct syntax to change a dynamic distribution list using the parameters that are detailed in #2 below

(1) **DID NOT WORK**
New-DynamicDistributionGroup -Name "tgmtest3" -OrganizationalUnit 'mydomain.com/Americas/Groups/Distribution' -RecipientContainer mydomain.com -RecipientFilter { recipienttype -eq 'usermailbox' -and HiddenfromAddresslistsEnabled -eq $false}

(2) ** This works**
New-DynamicDistributionGroup -Name "tgmtest4" -OrganizationalUnit 'mydomain.com/Americas/Groups/Distribution' -RecipientContainer mydomain.com -RecipientFilter { recipienttype -eq 'usermailbox' -and -not(HiddenfromAddresslistsEnabled -eq $true)}

(3) ** What should this format be? ** - I can toggle like below and it says it is successful, but FALSE is not correct
Set-DynamicDistributionGroup -Identity 'tgmtest3' -HiddenfromAddresslistsEnabled $false
Set-DynamicDistributionGroup -Identity 'tgmtest3' -HiddenfromAddresslistsEnabled $true

Please help me.  I have been on this task all morning and it only should have taken me a minute.

- Stowy
ASKER CERTIFIED SOLUTION
Avatar of Akhater
Akhater
Flag of Lebanon 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