Test AD Health and Repair
Overview
This script automates health checks, self-healing, and conditional service restarts for Active Directory Domain Controllers. It helps administrators quickly identify and remediate AD issues, ensuring domain controller reliability and service continuity.
Sample Run
Play Button
> Run Automation
> Script
Search and select Test Ad Health and Repair
Set the required arguments and click the Run
button to run the script.
Run As: System
Preset Parameter: <Leave it Blank>
SelfHeal: Initiates self-healing actions if AD issues are detected.Leave it blank to disable self-healing for the AD health issue fix, or set any value, such as 1, to enable the self-healing feature.
RestartAllADService: Restarts all core AD-related services if issues are detected and SelfHeal is enabled.Leave it blank for no action, or set it to any value to allow all AD services to restart. Note: The SelfHeal parameter must be enabled for this feature to operate.
ServicesToRestart: Specify one or more AD-related services to restart if issues are detected and SelfHeal is enabled. Ex: DNS, Netlogon. Note: The SelfHeal parameter must be enabled for this feature to operate.
Run Automation: Yes
Dependencies
Agnostic - Test-ADHealthAndRepair
Parameters
Name | Required | Accepted Values | Default | Type | Description |
---|---|---|---|---|---|
SelfHeal | False | 1 | String/Text | Initiates self-healing actions if AD issues are detected.Leave it blank to disable self-healing for the AD health issue fix, or set any value, such as 1, to enable the self-healing feature. | |
RestartAllADService | False | 1 | String/Text | Restarts all core AD-related services if issues are detected and SelfHeal is enabled.Leave it blank for no action, or set it to any value to allow all AD services to restart. Note: The SelfHeal parameter must be enabled for this feature to operate. | |
ServicesToRestart | False | DNS, Netlogon | String/Text | Specify one or more AD-related services to restart if issues are detected and SelfHeal is enabled. Ex: DNS, Netlogon. Note: The SelfHeal parameter must be enabled for this feature to operate. |
Automation Setup/Import
Step 1
Navigate to Administration
> Library
> Automation
Step 2
Locate the Add
button on the right-hand side of the screen, click on it and click the New Script
button.
The scripting window will open.
Step 3
Configure the Create Script
section as follows:
Name: Test AD Health and Repair
Description: This script automates health checks, self-healing, and conditional service restarts for Active Directory Domain Controllers. It helps administrators quickly identify and remedy AD issues, ensuring domain controller reliability and service continuity.
Categories: ProVal
Language: PowerShell
Operating System: Windows
Architecture: All
Run As: System
PowerShell And Variables
Saving the Automation
Click the Save
button in the top-right corner of the screen to save your automation.
You will be prompted to enter your MFA code. Provide the code and press the Continue button to finalize the process.
Output
- Activity Details
- Refer to the logs: "C:\ProgramData_automation\Script\Test-ADHealthAndRepair\Test-ADHealthAndRepair-log.txt"
- Refer to the error logs: "C:\ProgramData_automation\Script\Test-ADHealthAndRepair\Test-ADHealthAndRepair-error.txt"