Bypass distributiongroup setting

Posted on 2014-08-08
Last Modified: 2014-08-08
Hi Exports, I have this script that sets the RequireSenderAuthentication setting on true.
It works like a charm but now I have 3 DistributionGroup where the setting should be on false.
Can someone please help me to edit this file so I can reach my goal?

This how the script looks like:

Get-DistributionGroup | where {$_.RequireSenderAuthenticationEnabled -eq $False} | Set-DistributionGroup -RequireSenderAuthenticationEnabled $True

Kind regards,

Question by:KNBsysteembeheer01
    LVL 17

    Accepted Solution

    Try to add the custom attribute1 with common word for the 3 Distribution groups. Like below and then try to query the command.

    Set-DistributionGroup Group1 -CustomAttribute1 "Restricted"

    Open in new window

    Get-DistributionGroup | where {$_.RequireSenderAuthenticationEnabled -eq $False -and $_.CustomAttribute1 -ne "Restricted" } | Set-DistributionGroup -RequireSenderAuthenticationEnabled $True

    Open in new window


    Author Closing Comment

    Premkumar! You're the man! Thanks a lot for your help.
    I've tested it and it worked great!

    Kind regards,

    LVL 17

    Expert Comment

    by:Premkumar Yogeswaran
    Thanks for the grade len


    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
    Check out this infographic on what you need to make a good email signature that will work perfectly for your organization.
    In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
    In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now