Get the mail distribution list owner from Active Directory

Hi,

How can I get the owner of the Outlook  distribution list? I'm using the Directory Services namespace .  I've already get all the members of the a given mail group thru DirectorySearcher but there is no owner property available in DirectoryEntry Class. Can I use the Microsoft.Office.Interop.Outlook COM object to get the owner of the group (group name that I retrieve from DirectorySearcher)?  

Please advise.
MaxStephenAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chris DentPowerShell DeveloperCommented:
The owner is held in the managedBy attribute (property).

Chris
0
Shweta GoelCommented:
Go to Settings > Options > Other > Go to the earlier version > Groups > Distribution group I own > Edit > Ownership from the left hand window plane.
0
AmitIT ArchitectCommented:
It depends on how you labeled it. If you have labeled them properly either in description field or managed by you can query them via ps commands.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

MaxStephenAuthor Commented:
Hi All,

Thanks for sharing. I would like to achieved this programmatically using C#. I've already tried to use the DirectoryEntry Class properties but the "managedBy" property is not available on the class.  

Can I get the owner info by filtering the directory using the DirectorySearcher?  

Thanks,
Max
0
Chris DentPowerShell DeveloperCommented:
It's not a property on the class,  it's an attribute on the DirectoryEntry or SearchResult you get back.

DirectoryEntry.Properties['managedBy']

or

DirectoryEntry.Get('managedBy')

or, if you're using the DirectorySearcher and have added managedBy into the PropertiesToLoad:

SearchResult.Properties['managedby']

Chris
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MaxStephenAuthor Commented:
Thanks Chris.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Active Directory

From novice to tech pro — start learning today.