TestimoX

API Reference

Class

DuplicateObjectDetector (DirectoryOps)

Namespace ADPlayground.DirectoryOps
Assembly ADPlayground

Detects duplicate Active Directory objects based on the value of a specific attribute.

Inheritance

  • Object
  • DuplicateObjectDetector

Constructors

public DuplicateObjectDetector(Func<String, String, IEnumerable<ValueTuple<String, String>>> fetchAttributes = null, Func<IEnumerable<String>> enumerateDomains = null) #

Initializes a new instance of the DuplicateObjectDetector class.

Parameters

fetchAttributes System.Func{System.String,System.String,System.Collections.Generic.IEnumerable{System.ValueTuple{System.String,System.String}}} = null optionalposition: 0
Delegate retrieving attribute data from a domain.
enumerateDomains System.Func{System.Collections.Generic.IEnumerable{System.String}} = null optionalposition: 1
Delegate returning domain names to process.

Methods

public Void Check(String attributeName) #
Returns: Void

Logs warnings for duplicate attribute values across all domains.

Parameters

attributeName System.String requiredposition: 0
LDAP attribute name to check for duplicates.
public Void CheckDomain(String domainName, String attributeName) #
Returns: Void

Logs a warning for each duplicate attribute value in the given domain.

Parameters

domainName System.String requiredposition: 0
Domain to scan or null for current domain.
attributeName System.String requiredposition: 1
LDAP attribute name to check for duplicates.
GetDuplicates 2 overloads
public IEnumerable<ValueTuple<String, IReadOnlyList<String>>> GetDuplicates(String domainName, String attributeName, String objectClass = null) #
Returns: IEnumerable<ValueTuple<String, IReadOnlyList<String>>>

Finds duplicate attribute values in the specified domain.

Parameters

domainName System.String requiredposition: 0
Target domain name.
attributeName System.String requiredposition: 1
LDAP attribute name to check for duplicates.
objectClass System.String = null optionalposition: 2
Optional LDAP objectClass filter used to limit the query (for example, "user" or "computer").

Returns

Collection of duplicates with affected objects.

public IEnumerable<ValueTuple<String, IReadOnlyList<String>>> GetDuplicates(String attributeName) #
Returns: IEnumerable<ValueTuple<String, IReadOnlyList<String>>>

Finds duplicate attribute values across all domains in the forest.

Parameters

attributeName System.String requiredposition: 0
LDAP attribute name to check for duplicates.

Returns

Collection of duplicates with affected objects.