How can I get the account type from a list of DNs?
Posted on 2008-10-30
I have generated a list of accounts with altRecipients from active directory using dsquery
(dsquery * dc=domain,dc=com -attr userPrincipalName altRecipient > list.txt)
which generates this list:
firstname.lastname@example.org CN=Ashley Smith,OU=Users,OU=Headquarters,DC=domain,DC=com
email@example.com CN=Ann Jones,OU=Users,OU=Headquarters,DC=domain,DC=com
... and so on.
The problem is, some of these accounts are users, and some are contacts.
How can I take this information and determine which accounts are which (without looking it up manually in ADU&C)? I don't see a way I can just add another attribute to the dsquery above to find this, but if so, that would be great. Or, if I could pipe the text file containing the list above into a command, that would be OK also, but above my skill set at this point.
Any help would be greatly appreciated!!!!
thanks in advance...