Add AD User to Group With C#

This article will provide C# code that will allow you to leverage the Exchange Management Shell to add a Microsoft Exchange 2010/2013 User to a specified group. In order to use the code below, you must have the Exchange Management tools installed on the machine which will be running this code. Exchange Management Tools installation instructions can be found here. The code below can be used in creating either a console or windows forms application using SharpDevelop IDE. In creating your own application, you will want to ensure you have imported the required libraries using the code directly below.

Once you have imported all the required libraries, simply paste the function below in your code and start using it as needed.

Did you find this article useful? Why not share it with your friends?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.