code_junkie

How can I create Exchange distribution list inside the GAL using .NET?

Nov 11th, 2011
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. using (DirectoryEntry LDAPConnection = new DirectoryEntry("LDAP://OURDOMAIN/CN=" + name+ ",CN=Microsoft Exchange System Objects,DC=ourdomain,DC=com"))
  2. {
  3. LDAPConnection.AuthenticationType = AuthenticationTypes.Secure;
  4. LDAPConnection.Properties["msExchHideFromAddressLists"].Value = false;
  5. LDAPConnection.CommitChanges();
  6. }
Add Comment
Please, Sign In to add comment