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

  • Zurich University of Applied Sciences
  • Carillion
  • Olympus
  • Bank of Canada
  • Wargaming Interactive