A Read Only Domain Controller has the benefit of being able to perform administrative maintenance tasks without entering into Active Directory Restore Mode which previously required a reboot. The following command shows how to compact the Active Directory database from the command line. Before you start, remember not to leave the Active Directory Services stopped for a long period of time since replication of the active directory data will not occur during the period where it is shut down.
- Stop the Active Directory Services.
- From the command prompt with administrative privileges
- If you have successfully compacted the database you can now copy the files back to the proper location and delete the temp files. To do so execute the following command from the command prompt
- type copy “c:\TEMP\ntds.dit” “c:\Windows\NTDS\ntds.dit” and press enter
- When prompted press Y to overwrite and press enter.
- Restart the Active Directory Services
Subscribe in a reader