Hi,
New Group Name = "Test Group" The group will be named "Test-Group-123456789"
-Which name do you mean that will be renamed automatically? I checked all values in my test, one is Samaccountname, another one is Group name(pre-Windows2000) in ADUC. Do you really use this group name?
In Exchange 2010, there's only EMC for GUI, and you can specify the name when creating DG, so it's not an issue.
In Exchange 2013, it will specify samaccount name automatically, so it's not an issue:
In Exchange 2016&2019, it behaves as you said, I think that's what Microsoft want it to be.
For a workround but not recommended, I've tested it works:
1 On all Exchange Server 2016, find the %ExchangeInstallPath%Bin\CmdletExtensionAgents\ScriptingAgentConfig.xml.sample file, rename it to ScriptingAgentConfig.xml (Backup the original file)
2 Open renamed file, remove all the content and add the following script.
3 Enables the cmdlet extension agent named Scripting Agent: Enable-CmdletExtensionAgent "Scripting Agent"
4 Restart IE and try to create a new security group via EAC.
Script:
<?xml version="1.0" encoding="utf-8" ?>
<Configuration version="1.0">
<Feature Name="MailboxProvisioning" Cmdlets="New-DistributionGroup">
<ApiCall Name="OnComplete">
If($succeeded) {
$mbx = $provisioningHandler.UserSpecifiedParameters["Alias"]
Set-DistributionGroup $mbx -SamAccountName $mbx
}
</ApiCall>
</Feature>
</Configuration>
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.