Skip to content
Sponsor
3.0 preview2.3.0 stable

These docs describe the preview. Pick the version you run and every page marks what it doesn't have yet. Get the preview →
Maester 2.x docs (archived) →

Machine account quota should be retrievable

AD-DOM-02InfoActive DirectoryDomain and forest

Part of Active Directory · Active Directory · Domain and forest · All checks

Run this check
Invoke-Maester -TestId AD-DOM-02

The machine account quota (ms-DS-MachineAccountQuota) attribute controls how many computer accounts a standard (non-administrative) user can join to the domain. The default value of 10 can create security risks:

  • Rogue Computer Joins: Attackers with valid user credentials can join unauthorized computers to the domain
  • Lateral Movement: Joined computers can be used as pivot points for further attacks
  • Resource Exhaustion: Excessive computer accounts can clutter the directory and complicate management

Preventive

Consider reducing the machine account quota to 0 and using alternative methods for computer joins:

  1. Set quota to 0: Prevents standard users from joining computers
  2. Use pre-staged accounts: Administrators create computer accounts in advance
  3. Delegate join permissions: Grant specific groups permission to join computers
  4. Implement privileged access workstations: Use dedicated admin workstations for domain joins

To modify the quota:

Set-ADDomain -Identity "yourdomain.com" -Replace @{"ms-DS-MachineAccountQuota"="0"}

This test retrieves the current machine account quota value from Active Directory. The test is informational and helps you assess whether the default value poses a risk in your environment.

  • Test-MtAdDomainFunctionalLevel - Retrieves the domain functional level
  • Test-MtAdDomainControllerCount - Counts domain controllers
Every attribute of this check
FieldValue
Test IDAD-DOM-02
SeverityInfo
SuiteActive Directory
ProductActive Directory
FeatureDomain and forest
AreaAccess control
Resource typeTenant
MITRE ATT&CKT1136.002 Domain Account
PowerShell testTest-MtAdMachineAccountQuota
ServicesActiveDirectory
PermissionsActiveDirectory:Ldap:domainDNS.ms-DS-MachineAccountQuota:ReadProperty