TestimoX

API Reference

Class

InactiveUserDetector (ADPlayground)

Namespace ADPlayground
Assembly ADPlayground
Modifiers static

Helper methods for detecting accounts that never logged on.

Inheritance

  • Object
  • InactiveUserDetector

Methods

public static IEnumerable<AccountLogonInfo> FilterNeverLoggedIn(IEnumerable<AccountLogonInfo> accounts, Int32 gracePeriodDays) #
Returns: IEnumerable<AccountLogonInfo>

Returns accounts created longer than gracePeriodDays ago where both lastLogon and lastLogonTimestamp are either null or zero.

Parameters

accounts System.Collections.Generic.IEnumerable{ADPlayground.AccountLogonInfo} requiredposition: 0
Accounts to evaluate.
gracePeriodDays System.Int32 requiredposition: 1
Number of days after creation to allow logon.

Returns

Filtered collection of accounts.

public static IEnumerable<AccountLogonInfo> GetNeverLoggedInAccounts(String domainName, Int32 gracePeriodDays, String forestName = null) #
Returns: IEnumerable<AccountLogonInfo>

Queries Active Directory and returns accounts that never logged on.

Parameters

domainName System.String requiredposition: 0
Domain to query. When null or empty all domains in the current or specified forest are scanned.
gracePeriodDays System.Int32 requiredposition: 1
Number of days after creation to allow logon.
forestName System.String = null optionalposition: 2
Optional forest to target when domainName is not specified.

Returns

Collection of accounts with zero logons.