2. Assigning and Removing Membership for Individual Users, Groups, and Contacts
All users, groups, and contacts can be members of other groups. To configure a group's membership, follow these steps:
-
In the Exchange Management Console, double-click the group entry. This opens the group's Properties dialog box.
-
On the Members tab, you'll see a list of current members. Click Add
to add objects to the group. The Select Recipient dialog box appears.
You can now choose objects that should be members of this currently
selected group. Select the recipients you want to add to the group and
then click OK.
-
To remove a member from a group, select an object, and then click Remove. When you're finished, click OK.
In the Exchange Management Shell, you can view group members using the Get-DistributionGroupMember cmdlet. Example 4 provides the syntax and usage.
Example 4. Get-DistributionGroupMember cmdlet syntax and usage
Syntax
Get-DistributionGroupMember -Identity GroupIdentity
[-Credential
Credential
] [-DomainController FullyQualifiedName
]
[-IgnoreDefaultScope {$true | $false}] [-ReadFromDomainController {$true
| $false}] [-ResultSize Size
]
Usage
Get-DistributionGroupMember -Identity 'cpandl.com/Users/CorpSales'
You add members to a group using the Add-DistributionGroupMember cmdlet. Example 5 provides the syntax and usage.
Example 5. Add-DistributionGroupMember cmdlet syntax and usage
Syntax
Add-DistributionGroupMember -Identity GroupIdentity
[-Member
RecipientIdentity
] [-BypassSecurityGroupManagerCheck {$true | $false}]
[-DomainController FullyQualifiedName
]
[-ExternalManaged {$true | $false}]
Usage
Add-DistributionGroupMember -Identity 'cpandl.com/Users/CorpSales'
-Member 'cpandl.com/Sales/Kim Akers'
You remove members from a group using the Remove-DistributionGroupMember cmdlet. Example 6 provides the syntax and usage.
Example 6. Remove-DistributionGroupMember cmdlet syntax and usage
Syntax
Remove-DistributionGroupMember -Identity GroupIdentity
[-Member
RecipientIdentity
] [-BypassSecurityGroupManagerCheck {$true | $false}]
[-DomainController FullyQualifiedName
]
[-ExternalManaged {$true | $false}]
Usage
Remove-DistributionGroupMember -Identity 'cpandl.com/Users/CorpSales'
-Member 'cpandl.com/Sales/Kim Akers'
3. Adding and Removing Managers
To configure a group's managers, follow these steps:
-
In the Exchange Management Console, double-click the group entry. This opens the group's Properties dialog box.
-
On the Group Information tab, click Add to add managers to the
group. The Select Mailbox or Mail-Enabled Used dialog box appears. You
can now choose mailbox-enabled or mail-enabled users that should be
managers of this group. Select the recipients you want to add as
managers and then click OK.
-
To remove a manager from a group, select the manager in the Managed
By list and then click Remove. When you're finished, click OK.
In the Exchange Management Shell, you can add or remove group managers using the –ManagedBy parameter of the Set-DistributionGroup
cmdlet. To set this parameter, you must specify the full list of
managers for the group by doing the following:
-
Add managers by including existing managers and specifying the additional managers when you set the parameter.
-
Remove managers by specifying only those who should be managers and excluding those who should not be managers.
If you don't know the current managers of a group, you can list the
managers using Get-DistributionGroup. You'll need to format the output
and examine the value of the ManagedBy property.
Example 7 provides syntax and usage examples for adding and removing group managers.
Example 7. Adding and removing group managers
Syntax
Get-DistributionGroup -Identity GroupIdentity
| format-table
-property ManagedBy
Set-DistributionGroup -Identity GroupIdentity
-ManagedBy GroupManagers
Usage
Get-DistributionGroup -Identity 'cpandl.com/Users/CorpSales' |
format-table -property ManagedBy
Set-DistributionGroup -Identity 'cpandl.com/Users/CorpSales'
-ManagedBy 'cpandl.com/Sales/Daniel Escapa',
'cpandl.com/Users/Charlie Keen'
Usage
$g = Get-DistributionGroup -Identity 'cpandl.com/Users/CorpSales'
$h = $g.managedby + 'cpandl.com/Users/William Stanek'
Set-DistributionGroup -Identity 'cpandl.com/Users/CorpSales'
-ManagedBy $h
4. Configuring Member Restrictions and Moderation
Membership in
distribution groups can be restricted in several ways. Groups can be
open or closed for joining or require group owner approval for joining.
Groups can be open or closed for leaving. Groups also can be moderated.
With moderated groups, messages are sent to designated moderators for
approval before being distributed to members of
the group. The only exception is for a message sent by a designated
moderator. A message from a moderator is delivered immediately because
a moderator has the authority to determine what is and isn't an
appropriate message.
To configure member restrictions and moderation, follow these steps:
-
In the Exchange Management Console, double-click the group entry. This opens the group's Properties dialog box.
-
On the Membership Approval tab, choose settings for joining the group. The options are:
-
Open Anyone can join this group without being approved by the group owners.
-
Closed Members can be added only by the group owners. All requests to join will be rejected automatically.
-
Owner Approval Approval by the group owners is required.
-
Choose settings for leaving the group. The options are:
When you're finished, click OK.
-
On the Mail Flow Settings tab, double-click Message Moderation. This
opens the Message Moderation dialog box. To disable moderation, click
the Messages Sent To This Group Have To Be Approved By A Moderator
check box. To enable moderation, select the Messages Sent To This Group
Have To Be Approved By A Moderator check box, and then use the options
provided to specify group moderators, specify senders who don't require
message approval, and configure moderation notifications. Click OK to
save your changes.
In the Exchange Management Shell, you manage distribution group settings using Set-DistributionGroup.
You configure member restrictions for joining a group using the
MemberJoinRestriction parameter and configure member restrictions for
leaving a group using the MemberDepartRestriction parameter. If you
want to check the current restrictions, you can do this using Get-DistributionGroup.
You'll need to format the output and examine the values of the
MemberJoinRestriction property, the MemberDepartRestriction property,
or both.
Example 8 provides syntax and usage examples for configuring member restrictions.
Example 8. Configuring member restrictions for groups
Syntax
Get-DistributionGroup -Identity GroupIdentity
| format-table -property
Name, MemberJoinRestriction, MemberDepartRestriction
Set-DistributionGroup -Identity GroupIdentity
[-MemberJoinRestriction <Closed | Open | ApprovalRequired>]
[-MemberDepartRestriction <Closed | Open | ApprovalRequired>]
Usage
Get-DistributionGroup -Identity 'cpandl.com/Users/AllMarketing' |
format-table -property Name, MemberJoinRestriction,
MemberDepartRestriction
Set-DistributionGroup -Identity 'cpandl.com/Users/AllMarketing'
-MemberJoinRestriction 'Closed' -MemberDepartRestriction 'Closed'
Set-DistributionGroup parameters for configuring moderation include
ModerationEnabled, ModeratedBy, BypassModerationFromSendersOrMembers,
and SendModerationNotifications. You enable or disable moderation by
using ModerationEnabled. If moderation is enabled, you can do the
following:
-
Designate moderators using ModeratedBy.
-
Specify senders who don't require message approval by using BypassModerationFromSendersOrMembers.
-
Configure moderation notifications using SendModerationNotifications.
Example 9 provides syntax and usage examples for configuring moderation.
Example 9. Configuring moderation for groups
Syntax
Get-DistributionGroup -Identity GroupIdentity
| format-table -property
Name, ModeratedBy, BypassModerationFromSendersOrMembers,
SendModerationNotifications
Set-DistributionGroup -Identity GroupIdentity
[-ModeratedBy Moderators
] [-ModerationEnabled <$true | $false>]
[-BypassModerationFromSendersOrMembers Recipients
]
[-SendModerationNotifications <Never | Internal | Always>]
Usage
Get-DistributionGroup -Identity 'cpandl.com/Users/AllMarketing' |
format-table -property Name, ModeratedBy,
BypassModerationFromSendersOrMembers, SendModerationNotifications
Set-DistributionGroup -Identity 'cpandl.com/Users/AllMarketing'
-ModerationEnabled $true -Moderators 'cpandl.com/Users/AprilC'
-SendModerationNotifications 'Internal'