API Reference
Class
InactiveComputerDetector
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}
- Accounts to evaluate.
- gracePeriodDays System.Int32
- 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
- Domain to query. When null or empty all domains in the current or specified forest are scanned.
- gracePeriodDays System.Int32
- Number of days of allowed inactivity.
- forestName System.String = null
- Optional forest to target when domainName is not specified.
Returns
Collection of inactive computer accounts.