question

GlennMaxwell-2309 avatar image
0 Votes"
GlennMaxwell-2309 asked LucasLiu-MSFT commented

Exchange is appending numbers to DL

Hi All
i am using exchange2016 hybrid environment, i have created distribution list in exchange onprem by name Test Group.
But in AD i can see the group name as Test Group-396684025 in Group Name(pre-windows 2000). This is happening to all the DLs created in exchange onprem.
How to fix this.

Get-DistributionGroup Test.Group@contoso.com | FL Name,DisplayName,SamAccountName

Name : Test Group
DisplayName : Test Group
SamAccountName : Test Group-396684025


  1. How do i change the SamAccountName for Test Group using exchange powershell.

  2. how do i create new DL from Exchange powershell where i can specify the SamAccountName

office-exchange-server-administrationoffice-exchange-online-itprooffice-exchange-hybrid-itprooffice-exchange-server-itpro
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LucasLiu-MSFT avatar image
0 Votes"
LucasLiu-MSFT answered LucasLiu-MSFT commented

Hi @GlennMaxwell-2309 ,
1.You could run the following command to change the SamAccountName for distribution group:

 Set-DistributionGroup -Identity <> -SamAccountName <>

88904-image.png

2.You could run the following command to specify the SamAccountName when you create a new distribution group:

 New-DistributionGroup -Name <> -SamAccountName <>

88889-image.png

3.Please note: According to the Microsoft's official article, we could know the following information:
The SamAccountName parameter (also known as the pre-Windows 2000 user account or group name) specifies an object identifier that's compatible with older versions of Microsoft Windows client and server operating systems. The value can contain letters, numbers, spaces, periods (.), and the following characters: !, #, $, %, ^, &, -, _, {, }, and ~. The last character can't be a period. Unicode characters are allowed, but accented characters may generate collisions (for example, o and ö match). The maximum length is 20 characters.

For more information you could refer to: Set-DistributionGroup and New-DistributionGroup



If the response 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.






image.png (15.2 KiB)
image.png (13.5 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

In the Below Syntax do the Name represent Alias?

New-DistributionGroup -Name DGtest2@contoso.com -SamAccountName DGtest2

Will the below syntax work? i dont want displayname as DGtest2@contoso.com

New-DistributionGroup -Name DGtest2@contoso.com -DisplayName DGTest2 -SamAccountName DGTest2

0 Votes 0 ·

Hi @GlennMaxwell-2309 ,
Yes, if we not specify the Alias and DisplayName for this distribution group, then "Name" will represent its "Alias" and "Displayname".
Yes, you are correct. If you want to specify the display name, you could add the parameter "Displayname" when you run the "New-DistributionGroup". For more information you could refer to the link proivde above.
88907-3.png



If the response 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.




0 Votes 0 ·
3.png (10.9 KiB)

Hi @GlennMaxwell-2309 ,
Do suggestions above help? If the issue has been resolved, please click “Accept as answer” to mark helpful reply as an answer, this will make answer searching in the forum easier and be beneficial to other community members as well.

Thanks for your understanding.



If the response 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.


0 Votes 0 ·