Well, for AD, you need a Windows Server OS set up with domain controller role. Then you add machine accounts to the AD, instead of adding them to workgroup. The list of machines in a domain is maintained in LDAP directory.