ActiveDirectory: Create Security Group & Mail Enable using PowerShell

Modified on Thu, 03 Nov 2022 at 09:35 AM

If you are looking for a way to create an on-premise mail-enable local security group, you can use the following:

In PowerShell:

New-DistributionGroup -Type Security -Name <UniqueName> [-IgnoreNamingPolicy] [-Alias <Alias>] [-DisplayName "<DisplayName>"] [-Notes "<Description>"] [-OrganizationalUnit <OU>] [-ManagedBy "<owner1>","<owner2>"...] [-Members "<member1>","<member2>"...] [-CopyOwnerToMember] [-MemberJoinRestriction <Closed | ApprovalRequired>] [-RequireSenderAuthenticationEnabled <$true | $false>]

In Coreview:

   "id": "6cd0cee8-208a-47bf-acb7-5e0e09e829a1",
   "title": "AD - Create mail-enabled security group",
   "description": "Create an on-premises security group and then mail-enable it",
   "lastModified": "2022-06-09T07:37:49.3370000Z",
   "target": "None",
   "tags": [],
   "vars": [
         "name": "GroupName",
         "type": "string",
         "isRequired": true
   "params": [],
   "columns": {},
   "version": 3,
   "statement": "param ([string]$GroupName)\r\n\r\nNew-ADGroup -Name $GroupName -GroupCategory Security -GroupScope Universal\nEnable-DistributionGroup $GroupName"

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article