Create a new Team Mailbox with Security Groups

Last updated: 2016-12-20

Exchange Server 2013Exchange Server 2016Description

This script creates a new shared mailbox (aka team mailbox) and security groups for full access and and send-as delegation. The security groups are created using a naming convention. If required by your Active Directory team, you can add group prefixes or department abbreviations as well.

The script uses an XML configuration file to simplify changes for variables unique to your environment.

High-level steps the script executes:

  1. Create a new shared mailbox
  2. Create a new mail-enabled security group for full access delegation
  3. Assign a full access security group for full access to the shared mailbox
  4. Create a new mail-enabled security group for send-as delegation
  5. Assign send-as permissions to a send-as security group

Examples

XML settings file

<?xml version="1.0"?>
<Settings>
	<GroupSettings>
		<Prefix>pre_</Prefix>
		<SendAsSuffix>_SA</SendAsSuffix>
		<FullAccessSuffix>_FA</FullAccessSuffix>
		<CalendarBookingSuffix>_CB</CalendarBookingSuffix>
		<TargetOU>mcsmemail.de/IT/Groups/Mail</TargetOU>
		<Domain>mcsmemail.de</Domain>
		<Seperator>-</Seperator>
	</GroupSettings>
	<AccountSettings>
		<TargetOU>mcsmemail.de/IT/SharedMailboxes</TargetOU>
	</AccountSettings>
	<GeneralSettings>
		<Sleep>10</Sleep>
	</GeneralSettings>
</Settings>

The following example creates an empty shared mailbox for an internal Exchange Admin team with empty security groups.

.\New-TeamMailbox.ps1 -TeamMailboxName "TM-Exchange Admins" 
-TeamMailboxDisplayName "Exchange Admins" 
-TeamMailboxAlias "TM-ExchangeAdmins" 
-TeamMailboxSmtpAddress "ExchangeAdmins@mcsmemail.de" 
-DepartmentPrefix "IT"

The following Create-TeamMailbox.ps1 script simplifies the process of creating a team mailbox even more.

$teamMailboxName = 'TM-Exchange Admin'
$teamMailboxDisplayName = 'Exchange Admins'
$teamMailboxAlias = 'TM-ExchangeAdmin'
$teamMailboxSmtpAddress = 'ExchangeAdmins@mcsmemails.de'
$departmentPrefix = 'IT'
$groupFullAccessMembers = @('exAdmin1','exAdmin2')
$groupSendAsMember = @('exAdmin1','exAdmin2')

.\New-TeamMailbox.ps1 -TeamMailboxName $teamMailboxName 
-TeamMailboxDisplayName $teamMailboxDisplayName
-TeamMailboxAlias $teamMailboxAlias 
-TeamMailboxSmtpAddress $teamMailboxSmtpAddress 
-DepartmentPrefix $departmentPrefix 
-GroupFullAccessMembers $groupFullAccessMembers 
-GroupSendAsMember $groupSendAsMember 
-Verbose

Version History

  • 1.0, Initial community release
  • 1.1, Prefix separator added, PowerShell hygiene

Links

Follow

%d Bloggern gefällt das: