TestimoX

API Reference

Class

DcPasswordAgeChecker

Namespace ADPlayground.DomainControllers
Assembly ADPlayground

Checks domain controller computer account password age.

Inheritance

  • Object
  • DcPasswordAgeChecker

Constructors

public DcPasswordAgeChecker(Int32 thresholdDays = 45, Func<String, Nullable<DateTime>> fetchPasswordLastSet = null, Func<IEnumerable<String>> enumerateDcs = null) #

Initializes a new instance of the DcPasswordAgeChecker class.

Parameters

thresholdDays System.Int32 = 45 optionalposition: 0
Number of days after which a warning is raised.
fetchPasswordLastSet System.Func{System.String,System.Nullable{System.DateTime}} = null optionalposition: 1
Function retrieving the pwdLastSet value.
enumerateDcs System.Func{System.Collections.Generic.IEnumerable{System.String}} = null optionalposition: 2
Function returning domain controller names.

Methods

public virtual Void CheckAll() #
Returns: Void

Checks every domain controller returned by the enumerator.

public virtual Void CheckDc(String dcName) #
Returns: Void

Checks a single domain controller and logs a warning when the password age exceeds the threshold.

Parameters

dcName System.String requiredposition: 0
Domain controller name.
public virtual Nullable<DateTime> GetPasswordLastSet(String dcName) #
Returns: Nullable<DateTime>

Retrieves the pwdLastSet value for the domain controller computer account.

Parameters

dcName System.String requiredposition: 0
Domain controller name.

Returns

DateTime if available; otherwise null.

Properties

public virtual Int32 ThresholdDays { get; set; } #

Maximum allowed password age in days.