Q. How can I cause the Directory Services Garbage Collection process to log how much disk space might be freed up by performing an offline defragmentation?

Jerold Schulman

September 28, 2006

1 Min Read
ITPro Today logo in a gray background | ITPro Today

Tip 2635 How do I defragment the Active Directory database states:

During the Garbage Collection process which occurs every 12 hours, online defragmentation optimizes data storage and reclaims space for new objects, but it does not reduce the size of the Active Directory database (Ntds.dit).

To cause the Garbage Collection process to log a message in the Directory Service event log that states how much disk space might be freed up by performing an offline defragmentation:

1. Open a CMD.EXE window.

2. Using REG.EXE, built into Windows XP, Windows Server 2003, and later operating systems, or installed from the Windows 2000 Support Tools, type the following command and press Enter:

REG ADD HKLMSYSTEMCurrentControlSetServicesNTDSDiagnostics /V "6 Garbage Collection" /T REG_DWORD /F /D 1


Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like