API Reference
Class
OrphanedAccountRemediator
Provides methods to locate and remediate stale privileged accounts.
Inheritance
- Object
- OrphanedAccountRemediator
Methods
public static Void DeleteAccount(String samAccountName, String domainName = null) #Returns:
VoidDeletes the specified account.
Parameters
- samAccountName System.String
- SAM account name.
- domainName System.String = null
- Optional domain name.
public static Void DisableAccount(String samAccountName, String domainName = null) #Returns:
VoidDisables the specified account.
Parameters
- samAccountName System.String
- SAM account name.
- domainName System.String = null
- Optional domain name.
public static IEnumerable<String> GetOrphanedAccounts(String domainName, Int32 maxInactiveDays) #Returns:
IEnumerable<String>Retrieves admin and service accounts inactive for the specified number of days.
Parameters
- domainName System.String
- Optional domain to query.
- maxInactiveDays System.Int32
- Days without logon activity.
Returns
Collection of SAM account names.