RMAD determines the number of licenses required by counting the number of enabled users in the domain that is being backed up. An LDAP query is used to fine the number of enabled users. To run the same query manaully:
- Open Active Directory Users and Computers
- Right click the domain and select Find
- From the Find dropdown box select Custom Search
- Select the Advanced tab
- Copy the following query into the query window (based on the version of RMAD you are using) and click Find now:
Versions prior to 8.2.1:
(samAccountType=805306368)(objectSid=*)(!userAccountControl:1.2.840.113556.1.4.803:=2)
Versions 8.2.1 and 8.5.x:
(&(samAccountType=805306368)(objectSid=*)(!userAccountControl:1.2.840.113556.1.4.803:=2)(|(!objectclass=computer)(!serviceprincipalname=*:16993*)))
Versions 8.6.1 - 8.6.4:
(&(samAccountType=805306368)(objectSid=*)(!userAccountControl:1.2.840.113556.1.4.803:=2)(!objectclass=computer)(!objectclass=hpqTarget))
Version 8.7 and later:
(&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=512)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
- The number at the bottom of the find window will show the number of enabled users found in the domain and the number of licenses required for RMAD
Please note, if you have more than 10000 enabled users, you will need to run the query using Powershell or a different utility that allows you to run LDAP queries due to the 10000 object limit imposed on ADUC. To run the query using Powershell please run the following command:
Prior to 8.2.1:
(dsquery * -filter "(samAccountType=805306368)(objectSid=*)(!userAccountControl:1.2.840.113556.1.4.803:=2)" -attr samaccountname -attrsonly -limit 0).count
8.2.1 and 8.5.x:
(dsquery * -filter "(&(samAccountType=805306368)(objectSid=*)(!userAccountControl:1.2.840.113556.1.4.803:=2)(!objectclass=computer)(!objectclass=hpqTarget))" -attr samaccountname -attrsonly -limit 0).count
8.6.1 - 8.6.4:
(dsquery * -filter "(&(samAccountType=805306368)(objectSid=*)(!userAccountControl:1.2.840.113556.1.4.803:=2)(|(!objectclass=computer)(!serviceprincipalname=*:16993*)))" -attr samaccountname -attrsonly -limit 0).count
8.7 and later:
(dsquery * -filter "(&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=512)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))" -attr samaccountname -attrsonly -limit 0).count
If there is a discrepancy between what is returned by the LDAP query and what is shown in the Licensing Dashboard in the RMAD console, ensure that a recent backup has been run for each domain. The number of enabled users can show incorrectly if there are old backups which reflect that number of enabled users at the time the backup was created. The number of enabled users is counted when a backup occurs.