API Reference
Class
DcPasswordAgeChecker
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
- Number of days after which a warning is raised.
- fetchPasswordLastSet System.Func{System.String,System.Nullable{System.DateTime}} = null
- Function retrieving the pwdLastSet value.
- enumerateDcs System.Func{System.Collections.Generic.IEnumerable{System.String}} = null
- Function returning domain controller names.
Methods
public virtual Void CheckAll() #Returns:
VoidChecks every domain controller returned by the enumerator.
public virtual Void CheckDc(String dcName) #Returns:
VoidChecks a single domain controller and logs a warning when the password age exceeds the threshold.
Parameters
- dcName System.String
- 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
- Domain controller name.
Returns
DateTime if available; otherwise null.
Inherited Methods
Properties
public virtual Int32 ThresholdDays { get; set; } #Maximum allowed password age in days.