Get the App
SLTechnology News&Howtos  ›  Servers  › 

Create a distribution group using PowerShell

Shulou Source: shulou.com Published: 2022-06-02 14:14:31 09月28日 Update

Create about 20 distribution group scripts in batch.

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapInNew-DistributionGroup-Name XXXX-ManagedBy XXX-Type Distribution-Alias Public-MemberJoinRestriction Closed-MemberDepartRestriction Closed-RequireSenderAuthenticationEnabled $false

Because I am more accustomed to using ISE, so I need to import the management module of Exchange2016 first, the following is 2010.

Add-PSSnapin Microsoft.Exchange.Management.Powershell.E2010

Explain several important parameters by the way

Set up the administrator, you can use Name

ManagedBy

Set alias

Alias

Set that only administrators can add and remove distribution group members

MemberJoinRestriction Closed-MemberDepartRestriction Closed

Set up that everyone can send mail to this group.

RequireSenderAuthenticationEnabled $false

Check after you set it up.

Get-DistributionGroup-Identity XXXX | fl

Tags: Management communication administrator distribution group important alias parameter only owner module group member script mail face-to-face check explain Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Apple vpn Microsoft Shulou Information