Exchange Management Shell Bulk Properties

IT2 Minni 1 Reputation point

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.
6,493 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vasil Michev 70,486 Reputation points MVP

    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