You want to perform an offline defrag of the Active Directory DIT to reclaim whitespace in the DIT file.
First, reboot into Directory Services Restore Mode.
Next, check the integrity of the DIT, as outlined in Recipe 16.7.
Now, you are ready to perform the defrag. Run the following command to create a compacted copy of the DIT file. You should check to make sure the drive on which, you create the copy has plenty of space. A rule of thumb is that it should have at least 115% of the size of the current DIT available.
> ntdsutil files "compact to <
TempDriveAndFolder>" q q
Next, you need to delete the transaction log files in the current NTDS directory.
> del <
You may want to keep a copy of the original DIT file for a short period of time to ensure nothing catastrophic happens to the compacted DIT. If you are going to copy or move the original version, be sure you have enough space in its new location.
> move <
TempDriveAndFolder>\ntds_orig.dit > move <
Repeat the steps in Recipe 16.7 to ensure the new DIT is not corrupted. If it is clean, reboot into normal mode and monitor the event log. If no errors are reported in the event log, make sure the domain controller is backed up as soon as possible.
Performing an offline defragmentation of your domain controllers can ...