Active Directory Usefull Methods

Here are a few methods that will enable you to do some tasks in Active Directory.

Add Member
DirectoryEntry.Properties["member"].Add(fullUserPath);
DirectoryEntry.CommitChanges();
Directory.Close();

Remove Member
DirectoryEntry.Properties["member"].Remove(fullUserPath);
DirectoryEntry.CommitChanges();
Directory.Close();


Move Directory Object

currentLocation.MoveTo(oldLocationDirectory, newLocationDirectory);

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading



 

Dilbert of the day