By default, any signed-in user can join ten computers to the domain. A pupil could join their own laptop, and attackers use the same right to plant computer accounts. Set the limit to zero so only administrators can join computers.
What improves
Only administrators can join computers to the domain.
Why it matters
By default any user can join ten computers, and attackers use that right to plant computer accounts.
How you do it
Set the machine account quota to 0 and check it.
Check the current limit
CON-DC-01
$dom = Get-ADDomain (Get-ADObject $dom.DistinguishedName -Properties 'ms-DS-MachineAccountQuota').'ms-DS-MachineAccountQuota'
A new domain returns 10.
Set it to zero
CON-DC-01
Set-ADDomain -Identity $dom -Replace @{ 'ms-DS-MachineAccountQuota' = 0 }Check
Run the command from step 1 again. It should return 0.
Who can still join computers
- Domain admins are not affected.
- Technicians who are not domain admins need the right delegated on the OU where new computers go.
- Imaging and deployment tools that join computers with a service account need the same delegation for that account.
Done when
Check
The quota reads 0.


