Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Bulk Office 365 Internal Only Distribution Group Set

Posted on 2014-12-15
2
Medium Priority
?
499 Views
Last Modified: 2014-12-17
Hi Experts,

I have the following command:

Set-DistributionGroup testgroup -RequireSenderAuthenticationEnabled $False

Open in new window


This will set the group to INTERNAL only. I would like to be able to import a list of group names within a CSV and run this command. I know a FOR loop will be required. Any idea how this can be achieved.

I was thinking something like:

Import-Csv "C:\temp\groups.csv" | foreach {Set-DistributionGroup..............}

Open in new window


Any help will be appreciated.

Regards,

introlux
0
Comment
Question by:introlux
2 Comments
 
LVL 19

Accepted Solution

by:
Raheman M. Abdul earned 1800 total points
ID: 40500185
Import-Csv "C:\temp\groups.csv" | foreach { Set-DistributionGroup $_.GroupName -RequireSenderAuthenticationEnabled $False }

Csv file should be of this format:  (first cell value "GroupName" )

GroupName
testgroup1
testgroup1
testgroup3
....
0
 
LVL 8

Assisted Solution

by:tshearon
tshearon earned 200 total points
ID: 40500346
Just a note, but if you use '-RequireSenderAuthenticationEnabled $False' then you are saying non-authenticated users can send which makes the group accessible to external senders. That switch should be set to true to achieve the result you desire.
0

Featured Post

WatchGuard Case Study: NCR

With business operations for thousands of customers largely depending on the internal systems they support, NCR can’t afford to waste time or money on security products that are anything less than exceptional. That’s why they chose WatchGuard.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
Eseutil Hard Recovery is part of exchange tool and ensures Exchange mailbox data recovery when mailbox gets corrupt due to some problem on Exchange server.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

916 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