API Reference
Class
DuplicateObjectDetector (DirectoryOps)
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
- Delegate retrieving attribute data from a domain.
- enumerateDomains System.Func{System.Collections.Generic.IEnumerable{System.String}} = null
- Delegate returning domain names to process.
Methods
public Void Check(String attributeName) #Returns:
VoidLogs warnings for duplicate attribute values across all domains.
Parameters
- attributeName System.String
- LDAP attribute name to check for duplicates.
public Void CheckDomain(String domainName, String attributeName) #Returns:
VoidLogs a warning for each duplicate attribute value in the given domain.
Parameters
- domainName System.String
- Domain to scan or null for current domain.
- attributeName System.String
- 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
- Target domain name.
- attributeName System.String
- LDAP attribute name to check for duplicates.
- objectClass System.String = null
- 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
- LDAP attribute name to check for duplicates.
Returns
Collection of duplicates with affected objects.