Skip to main content

Audit - Inactive AD Users - X Days

Summary

This script detects the inactive users over X days (configurable via the system property Inactive_AD_Users_Threshold_Days; default: 90 days) and records the data into the Table - pvl_ad_inactive_users. The data is then displayed in the Dataview - AD Inactive Users Audit.

Sample Run

  • First Run: It is needed to run this script initially with a value of 1 to create the Table - pvl_ad_inactive_users, EDFs, and the system property.
    Sample Run

  • Regurlar Run: Run normally to fetch the inactive AD users over threshold.
    Sample Run 1

File Hash

PathAlgorithmHash
C:\ProgramData\_automation\script\Inactive_ADUsers\Audit_Inactive_ADUser.ps1MD58F49D3B9502141C1BB43576CD9897CBC
C:\ProgramData\_automation\script\Inactive_ADUsers\Audit_Inactive_ADUser.ps1SHA256C96869CF1573DF6B798CBE1DCB42767B1D111369881224B5ABEC9FBA6AB477A5

EDFs

NameLevelTypeTabDescription
Exclude AD Inactive UserListClientTextAutomationThis accepts the user list that is required to be excluded from disabling the inactive AD users in the client domain. EDF
Enable Inactive Disabled AD UsersClientCheckboxAutomationThis will enable the inactive disabled users of the clients domain. EDF
Audit Inactive AD UsersClientCheckboxAutomationThis enable the auditing of the Inactive AD Users of the client domain. EDF

System Property

NameExampleRequiredDescription
Inactive_AD_Users_Threshold_Days90TrueThis is set to detect the inactive users those are not logged in from the provided days. Default is 90 days. Property
Inactive_AD_Users_Exclude_Disabledemo,test,testuserFalseThis will exclude the users from being included in the list to get disabled. The user's list should be provided in a comma-separated format. e.g., John,Kevin,demo. Property

Dependencies

Solution- Inactive AD Users Disable/Enable

User Parameters

NameExampleRequiredDescription
SetEnvironment1FalseIt is needed to run this script initially with a value of 1 to create the Table - pvl_ad_inactive_users, import the required EDFs, and the system property.

Output