Skip to main content
Jorge Bernhardt Jorge Bernhardt
  1. Posts/

How to check the size of the Active Directory Database

·303 words·2 mins· 100 views · 5 likes ·
Active Directory Active Directory Database Microsoft Microsoft Windows

The size of the active directory database on a domain controller is the size of the NTDS.dit file. This size may vary between domain controllers in the same domain, due to non-replicated changes, differences with non-replicated data, and white-space from purge objects. To perform this task, we will use the ntdsutil.exe command-line tool. Important: Log on as a member of the Domain Admins group and run the NTDSUTIL tool from an elevated command prompt. OK let’s go. To check the size of your ADDS database, use the following procedure: 1.- On your domain controller, in the server manager, click Tools, and then click Services to open the services console. 2.- Stop the Active Directory Domain Services service. 3.- You are prompted to stop related services, such as DNS Server, Kerberos Key Distribution Center, Intersite Messaging, and DFS Replication. Click Yes to stop these services.

Active Directory Domain Services
You can also use Powershell to perform this task, using the following command in an elevated PowerShell session:

Get-Service ntds `
    | Stop-Service -force

4.- Open an elevated command prompt. 5.- Run the NtdsUtil.exe command 6.- Run the following commands:

activate instance ntds

active directory database
7.- In the services console, start the Active Directory Domain Services. Related services are also started. You can also use Powershell to perform this task, using the following command in an elevated PowerShell session:

Get-Service ntds `
    | Start-Service

If you find that you are running out of disk space or you have different size files between domain controllers, you can perform an offline defragmentation of an AD DS database. After this process, you will have a compacted Active Directory Database. Thanks for reading my post. I hope you find it useful.

If you want to know more about How To Use Ntdsutil to Manage Active Directory Files, check out this link.