TestimoX

API Reference

Class

TrueLastLogonResolver

Namespace ADPlayground
Assembly ADPlayground
Modifiers static

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) #
Returns: Dictionary<String, Nullable<DateTime>>

Resolves computer lastLogon across all domain controllers synchronously and returns the most recent value per computer.

Parameters

domainName System.String requiredposition: 0
DNS domain name.
computers System.Collections.Generic.IEnumerable{ADPlayground.ComputerRecord} requiredposition: 1
Computers to resolve (SAM account names, with or without trailing '$').
maxDegreeOfParallelism System.Int32 = 4 optionalposition: 2
Maximum concurrent DC lookups.
cancellationToken System.Threading.CancellationToken = null optionalposition: 3
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) #
Returns: Task<Dictionary<String, Nullable<DateTime>>>

Resolves computer lastLogon across all domain controllers and returns the most recent value per computer.

Parameters

domainName System.String requiredposition: 0
DNS domain name.
computers System.Collections.Generic.IEnumerable{ADPlayground.ComputerRecord} requiredposition: 1
Computers to resolve (SAM account names, with or without trailing '$').
maxDegreeOfParallelism System.Int32 = 4 optionalposition: 2
Maximum concurrent DC lookups.
cancellationToken System.Threading.CancellationToken = null optionalposition: 3
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) #
Returns: Dictionary<String, Nullable<DateTime>>

Resolves user lastLogon across all domain controllers synchronously and returns the most recent value per user.

Parameters

domainName System.String requiredposition: 0
DNS domain name.
users System.Collections.Generic.IEnumerable{ADPlayground.UserRecord} requiredposition: 1
Users to resolve (SAM account names).
maxDegreeOfParallelism System.Int32 = 4 optionalposition: 2
Maximum concurrent DC lookups.
cancellationToken System.Threading.CancellationToken = null optionalposition: 3
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) #
Returns: Task<Dictionary<String, Nullable<DateTime>>>

Resolves user lastLogon across all domain controllers and returns the most recent value per user.

Parameters

domainName System.String requiredposition: 0
DNS domain name.
users System.Collections.Generic.IEnumerable{ADPlayground.UserRecord} requiredposition: 1
Users to resolve (SAM account names).
maxDegreeOfParallelism System.Int32 = 4 optionalposition: 2
Maximum concurrent DC lookups.
cancellationToken System.Threading.CancellationToken = null optionalposition: 3
Cancellation token.

Returns

Map of SAM account name to the most recent lastLogon value (or null when unknown).