TestimoX

API Reference

Class

InactiveComputerDetector

Namespace ADPlayground.Computers
Assembly ADPlayground
Modifiers static

Provides methods for locating computer accounts that have not logged on within a configurable grace period.

Inheritance

  • Object
  • InactiveComputerDetector

Methods

public static IEnumerable<InactiveComputerInfo> FilterInactiveAccounts(IEnumerable<InactiveComputerInfo> accounts, Int32 gracePeriodDays) #
Returns: IEnumerable<InactiveComputerInfo>

Filters computer accounts that have not logged on since gracePeriodDays.

Parameters

accounts System.Collections.Generic.IEnumerable{ADPlayground.Computers.InactiveComputerInfo} requiredposition: 0
Accounts to evaluate.
gracePeriodDays System.Int32 requiredposition: 1
Number of days of allowed inactivity.

Returns

Collection of inactive computer accounts.

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

Queries Active Directory and returns computer accounts inactive since gracePeriodDays.

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 of allowed inactivity.
forestName System.String = null optionalposition: 2
Optional forest to target when domainName is not specified.

Returns

Collection of inactive computer accounts.