API Reference
TrueLastLogonResolver
Resolves the effective ("true") lastLogon time for users and computers by querying each domain controller and selecting the most recent timestamp.
Inheritance
- Object
- TrueLastLogonResolver
Methods
public static Dictionary<String, Nullable<DateTime>> ResolveComputers(String domainName, IEnumerable<ComputerRecord> computers, Int32 maxDegreeOfParallelism = 4, CancellationToken cancellationToken = null) #Dictionary<String, Nullable<DateTime>>Resolves computer lastLogon across all domain controllers synchronously and returns the most recent value per computer.
Parameters
- domainName System.String
- DNS domain name.
- computers System.Collections.Generic.IEnumerable{ADPlayground.ComputerRecord}
- Computers to resolve (SAM account names, with or without trailing '$').
- maxDegreeOfParallelism System.Int32 = 4
- Maximum concurrent DC lookups.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
Returns
Map of SAM account name to the most recent lastLogon value (or null when unknown).
public static async Task<Dictionary<String, Nullable<DateTime>>> ResolveComputersAsync(String domainName, IEnumerable<ComputerRecord> computers, Int32 maxDegreeOfParallelism = 4, CancellationToken cancellationToken = null) #Task<Dictionary<String, Nullable<DateTime>>>Resolves computer lastLogon across all domain controllers and returns the most recent value per computer.
Parameters
- domainName System.String
- DNS domain name.
- computers System.Collections.Generic.IEnumerable{ADPlayground.ComputerRecord}
- Computers to resolve (SAM account names, with or without trailing '$').
- maxDegreeOfParallelism System.Int32 = 4
- Maximum concurrent DC lookups.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
Returns
Map of SAM account name to the most recent lastLogon value (or null when unknown).
public static Dictionary<String, Nullable<DateTime>> ResolveUsers(String domainName, IEnumerable<UserRecord> users, Int32 maxDegreeOfParallelism = 4, CancellationToken cancellationToken = null) #Dictionary<String, Nullable<DateTime>>Resolves user lastLogon across all domain controllers synchronously and returns the most recent value per user.
Parameters
- domainName System.String
- DNS domain name.
- users System.Collections.Generic.IEnumerable{ADPlayground.UserRecord}
- Users to resolve (SAM account names).
- maxDegreeOfParallelism System.Int32 = 4
- Maximum concurrent DC lookups.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
Returns
Map of SAM account name to the most recent lastLogon value (or null when unknown).
public static async Task<Dictionary<String, Nullable<DateTime>>> ResolveUsersAsync(String domainName, IEnumerable<UserRecord> users, Int32 maxDegreeOfParallelism = 4, CancellationToken cancellationToken = null) #Task<Dictionary<String, Nullable<DateTime>>>Resolves user lastLogon across all domain controllers and returns the most recent value per user.
Parameters
- domainName System.String
- DNS domain name.
- users System.Collections.Generic.IEnumerable{ADPlayground.UserRecord}
- Users to resolve (SAM account names).
- maxDegreeOfParallelism System.Int32 = 4
- Maximum concurrent DC lookups.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
Returns
Map of SAM account name to the most recent lastLogon value (or null when unknown).