Welcome:
This PowerShell module automates the creation of a Distribution Group and assigns shared mailbox permissions in one go. Built for environments like Pimco and Monster where access precision and scale are critical.
Description:
Create a Distribution Group with over 20 members, nest a shared mailbox and another DL, and assign permissions like “Send As” and “Full Access” as needed.
# Create Distribution Group
New-DistributionGroup -Name "LegalTeamDG" -PrimarySmtpAddress [email protected] -OrganizationalUnit "OU=Groups,DC=domain,DC=com"
# Add users
$users = @("[email protected]", "[email protected]", ..., "[email protected]")
foreach ($user in $users) {
Add-DistributionGroupMember -Identity "LegalTeamDG" -Member $user
}
# Nest a Shared Mailbox and DL
Add-DistributionGroupMember -Identity "LegalTeamDG" -Member "[email protected]"
Add-DistributionGroupMember -Identity "LegalTeamDG" -Member "[email protected]"
# Assign Send As and Full Access
Add-RecipientPermission -Identity "[email protected]" -Trustee "LegalTeamDG" -AccessRights SendAs -Confirm:$false
Add-MailboxPermission -Identity "[email protected]" -User "LegalTeamDG" -AccessRights FullAccess -InheritanceType All
Replace placeholder values with actual names and domains.
Requires Exchange Online PowerShell module.
Add DLs with caution—permissions are inherited recursively.
© 2012–2025 Jet Mariano. All rights reserved.
For usage terms, please see the Legal Disclaimer.