Example of work with Active Directory objects

Example of work with Active Directory objects

As mentioned in the introduction, HarePoint Explorer for SharePoint can be used for operations not only with SharePoint object model, but also with any other object model built on basis of .NET platform.

As an example, let us review the object model that provides access to Active Directory objects.

Each node of Active Directory in .NET model is presented via object of type DirectoryEntry. To access the root node, we can use constructor DirectoryEntry without parameters.

The following must be done for that:

  1. Create new script window.
  2. In the upper right window part, add reference to assembly System.DirectoryServices.dll to the list of additional references.
  3. Create object DirectoryEntry with the help of operator new and return reference to created object.


Directory Entry
Click to open real size screenshot

As a result of script execution, new browser window will be opened. Using this window the whole hierarchy of Active Directory can be researched:


Hierarchy of Active Directory
Click to open real size screenshot

Our valued customers

HarePoint products are recognized by thousands of companies

  • PwC
  • Department of Finance and Administration, State of Arkansas
  • Jones Lang LaSalle
  • Samsung
  • CGGVeritas Services
The Website uses cookies that allow us to recognize you and collect information about your user experience.

Permission to use cookies necessary for the use of the Site and its services, including ordering services. By visiting the site, we are sure that you consent to the use and storage of cookies on your device. If you agree, continue to use the site. If not – set special settings in your browser or contact technical support.