Exchange Management Shell Bulk Properties

IT2 Minni 1 Reputation point
2022-11-20T01:15:43.203+00:00

Good Evening,

I am a Navy IT and this is my first time diving into powershell. My interest is peaked because I need to find a way to change a property on multiple security groups to allow emails from outside of our domain. Any help would be appreciated as well as any good references for me to start teaching myself Powershell and Exchange Management Shell.

Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,708 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vasil Michev 109.9K Reputation points MVP
    2022-11-20T06:43:48.02+00:00

    You can achieve this task in several different methods, but for the sake of giving you an example, let's assume you have the list of groups in a CSV file, with a column GroupEmail to designate each group's email address. Start by importing the list:

    $groups = Import-CSV blabla.csv  
    

    Then, we use a simple cycle (foreach statement) to iterate over the groups, and toggle the -RequireSenderAuthenticationEnabled property (which controls the external message delivery setting):

    $groups | % { Set-DistributionGroup $_.GroupEmail -RequireSenderAuthenticationEnabled $false }  
    

    Here % stands as an alias for the foreach statement; $_ represents the current object as it passes the pipeline, in other words it automatically represents each group object as imported from the CSV; $_.PropertyName will represent the value of the corresponding property for the current group, in our case this will be the email address as imported from the CSV.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.