Recently came a demand, to create 20 or so distribution groups, in the ECP one point is too hard, so there is the following paragraph.
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapInNew-DistributionGroup -Name 公共专员 -ManagedBy NF1234 -Type Distribution -Alias Public -MemberJoinRestriction Closed -MemberDepartRestriction Closed -RequireSenderAuthenticationEnabled $false
Because I am more accustomed to use ISE, so need to first import Exchange2016 management module, the following is 2010.
Add-PSSnapin Microsoft.Exchange.Management.Powershell.E2010
Explain several important parameters by the way
To set up an administrator, you can use the name
Setting aliases
-Alias Public
Set up only administrators to add and remove distribution Group members
-MemberJoinRestriction Closed -MemberDepartRestriction Closed
Set up everyone can send mail to this group
-RequireSenderAuthenticationEnabled $false
Set it up and check it out.
Get-DistributionGroup -Identity 公共专员 | fl
Create a distribution group using PowerShell