Programmatically create a distribution group in Active Directory

I have a Windows domain here that runs Exchange 2007, and I need to create new mailing lists programmatically.

From what I could put together so far, the Exchange mailing lists are regular AD groups, so I have to worry about interacting with AD. I used the System.DirectoryService namespace to query AD, but I'm not sure what the correct way would be to create a distribution group here. Especially it should be enabled by mail and displayed in the Outlook address book, so I don’t know if I need to invoke some kind of magic in order for Exchange to take a new group?

Any pointers?

+3
source share
1 answer

The magic that you need to invoke to create a distribution list for Exchange is PowerShell, so you'll need to dive into the beautiful world of cmdlets .; -)

You can create a distribution group in Active Directory using System.DirectoryServices(or more easily if you use .NET 3.5 through System.DirectoryServices.AccountManagement), add items, etc., and then use Enable-DistributionGroup-cmdlet to include the group via email.

You can also create groups and email them at the same time using New-DistributionGroup-cmdlet.

, PowerShell, Exchange Active Directory, proxyAddresses .. "" ( System.DirectoryServices), , , . ( Microsoft Support) .

, , Googling , PowerShell .NET- ( , , ) - MSDN , .

+5

Source: https://habr.com/ru/post/1723827/


All Articles