Book Image

Microsoft Exchange Server Powershell Cookbook (Update)

Book Image

Microsoft Exchange Server Powershell Cookbook (Update)

Overview of this book

Table of Contents (21 chapters)
Microsoft Exchange Server PowerShell Cookbook Third Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Configuring message delivery restrictions


Since distribution groups contain multiple members, you may want to place restrictions on who can send messages to these recipients. Exchange allows you to tightly control these settings and provides several options when it comes to placing message delivery restrictions on groups. We can also place restrictions on other recipient types in the organization. This recipe will show you how to configure these options from the Exchange Management Shell.

How to do it...

Let's see how to configure restrictions on message delivery using the following steps:

To restrict who can send messages to a group, use the Set-DistributionGroup cmdlet:

Set-DistributionGroup -Identity Sales `
-AcceptMessagesOnlyFrom 'Bob Smith','John Jones'

After running this command, only the users Bob Smith and John Jones can send messages to the Sales distribution group.

How it works...

The -AcceptMessagesOnlyFrom parameter allows you to specify one or more recipients who are allowed to...