Welcome to Powergui.org - an open source community for Windows Powershell

PowerGUI.org PowerGUI.org and blogs

Forums » Request a Script

Thread: Use Powershell to restrict all Mail-enabled Groups to AUthenticated Users

This question is not answered. Helpful answers available: 2. Answered answers available: 1.


Permlink Replies: 7 - Pages: 1 - Last Post: Aug 15, 2007 2:24 PM by: Dmitry Sotnikov
Fibu

Posts: 2
Registered: 8/15/07
Use Powershell to restrict all Mail-enabled Groups to AUthenticated Users
Posted: Aug 15, 2007 12:07 PM
 
  Click to reply to this thread Reply

We Have been getting a lot of spam coming into our organization and adding to that somehow our Groups are also being picked up even the most obscurely named ones.


We have over 1500 groups and there is no way to do this 1 by one.


I have been searching for any sample scripts which would let me take a csv file of groups and set the "From authenticated users only" flag under the Message Restrictions Section of the Exchange General Tab.

Does anyone know what commands I could use to do this or if anyone has a script I could use?

Any help would be greatly appreciated. 




KirkAMunro


Posts: 822
Registered: 3/20/07
Re: Use Powershell to restrict all Mail-enabled Groups to AUthenticated Users
Posted: Aug 15, 2007 12:07 PM   in response to: Fibu
 
  Click to reply to this thread Reply

What version of Exchange?

Kirk Munro [MVP]
Poshoholic

My blog: http://poshoholic.com
Follow me on Twitter: http://twitter.com/poshoholic
Dmitry Sotnikov


Posts: 1,151
Registered: 12/1/06
Re: Use Powershell to restrict all Mail-enabled Groups to AUthenticated Use
Posted: Aug 15, 2007 1:07 PM   in response to: Fibu
 
  Click to reply to this thread Reply

If it's Exchange 2007, you should be able to just use PowerGUI and its Exchange 2007 pack.

1. Install it on a computer which has Exchange 2007 or Exchange 2007 management tools.
2. Go to Exchange 2007/Recipients/Distribution Groups.
3. On the Actions pane click Change Properties and select True in the RequireSenderAuthenticationEnabled parameter.

See attached screenshot.



Fibu

Posts: 2
Registered: 8/15/07
Re: Use Powershell to restrict all Mail-enabled Groups to AUthenticated Use
Posted: Aug 15, 2007 1:19 PM   in response to: Dmitry Sotnikov
 
  Click to reply to this thread Reply

Unfortunalty we are still on exchange 2003 and won't be migrating for another few months. 
Is there any way to find out the code used for that?  Maybe it may apply for the 2003 group.


KirkAMunro


Posts: 822
Registered: 3/20/07
Re: Use Powershell to restrict all Mail-enabled Groups to AUthenticated Use
Posted: Aug 15, 2007 1:29 PM   in response to: Fibu
 
  Click to reply to this thread Reply

Sounds like a job for the Quest AD cmdlets!

You should be able to use the free Quest AD cmdlets to set the msExchRequireAuthToSendTo attribute to true on all of the mail-enabled groups.



Kirk Munro [MVP]
Poshoholic

My blog: http://poshoholic.com
Follow me on Twitter: http://twitter.com/poshoholic
Dmitry Sotnikov


Posts: 1,151
Registered: 12/1/06
Re: Use Powershell to restrict all Mail-enabled Groups to AUthenticated Use
Posted: Aug 15, 2007 1:35 PM   in response to: KirkAMunro
 
  Click to reply to this thread Reply

Do you know what the right value for msExchRequireAuthToSendTo is?


KirkAMunro


Posts: 822
Registered: 3/20/07
Re: Use Powershell to restrict all Mail-enabled Groups to AUthenticated Use
Posted: Aug 15, 2007 1:59 PM   in response to: Dmitry Sotnikov
 
  Click to reply to this thread Reply

It's a boolean value; setting it to true will enable the property.

Kirk Munro [MVP]
Poshoholic

My blog: http://poshoholic.com
Follow me on Twitter: http://twitter.com/poshoholic
Dmitry Sotnikov


Posts: 1,151
Registered: 12/1/06
Re: Ignore this reply
Posted: Aug 15, 2007 2:24 PM   in response to: KirkAMunro
 
  Click to reply to this thread Reply

Here's the syntax for attribute set in AD:
http://dmitrysotnikov.wordpress.com/2007/07/25/set-any-ad-attribute-with
-powershell/


Legend
MVP: 2501 + pts
Guru: 2001 - 2500 pts
Expert: 751 - 2000 pts
Enthusiast: 31 - 750 pts
Novice: 0 - 30 pts
Moderators
Helpful answer (5 pts)
Answered (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums