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.

-
Regurlar Run: Run normally to fetch the inactive AD users over threshold.

File Hash
| Path | Algorithm | Hash |
|---|---|---|
C:\ProgramData\_automation\script\Inactive_ADUsers\Audit_Inactive_ADUser.ps1 | MD5 | 8F49D3B9502141C1BB43576CD9897CBC |
C:\ProgramData\_automation\script\Inactive_ADUsers\Audit_Inactive_ADUser.ps1 | SHA256 | C96869CF1573DF6B798CBE1DCB42767B1D111369881224B5ABEC9FBA6AB477A5 |
EDFs
| Name | Level | Type | Tab | Description |
|---|---|---|---|---|
| Exclude AD Inactive UserList | Client | Text | Automation | This accepts the user list that is required to be excluded from disabling the inactive AD users in the client domain. ![]() |
| Enable Inactive Disabled AD Users | Client | Checkbox | Automation | This will enable the inactive disabled users of the clients domain. |
| Audit Inactive AD Users | Client | Checkbox | Automation | This enable the auditing of the Inactive AD Users of the client domain. ![]() |
System Property
| Name | Example | Required | Description |
|---|---|---|---|
| Inactive_AD_Users_Threshold_Days | 90 | True | This is set to detect the inactive users those are not logged in from the provided days. Default is 90 days. ![]() |
| Inactive_AD_Users_Exclude_Disable | demo,test,testuser | False | This 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. ![]() |
Dependencies
Solution- Inactive AD Users Disable/Enable
User Parameters
| Name | Example | Required | Description |
|---|---|---|---|
SetEnvironment | 1 | False | It 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. |



