LDIFDE Export (Full Version)

All Forums >> [Microsoft Exchange 2003] >> General



Message


andyturn -> LDIFDE Export (26.Jan.2009 11:27:37 AM)

I currently run two bat files to export email addresses from AD. The first is for Users and the second is for the Distribution Groups (I am looking for the actual smtp address of the Dis Group not the individual memebers). Does anyone know how I can combine them so I just get one .ldf file with the Groups and the Users?

User Bat:
CALL ldifde -f Exportuser.ldf -s tg-b01 -d "dc=timmons,dc=com" -p subtree -r "(&(objectCategory=person)(objectClass=User)(givenname=*))" -l "cn,givenName,objectclass,samAccountName,proxyAddresses"

Distribution Groups Bat:
CALL ldifde -f Exportuser2.ldf -s tg-b01 -d "dc=timmons,dc=com" -p subtree -r "(&(objectCategory=group)(objectClass=group))" -l "cn,givenName,objectclass,samAccountName,proxyAddresses"




tiallen -> RE: LDIFDE Export (26.Jan.2009 1:57:34 PM)

Try This:
CALL ldifde -f Combined.ldf -s tg-b01 -d "dc=timmons,dc=com" -p subtree -r "(|(&(objectCategory=group)(objectClass=group))(&(objectCategory=person)(objectClass=User)(givenname=*)))" -l "cn,givenName,objectclass,samAccountName,proxyAddresses"




andyturn -> RE: LDIFDE Export (27.Jan.2009 9:40:09 AM)

That worked!!! Thanks Tim. I am guessing the pipe is basically an "and"?




tiallen -> RE: LDIFDE Export (27.Jan.2009 10:03:28 AM)

No problem...

The pipe is actually an "OR" operator. So your filter is matching either condition, in a more human readable format:
(Category&Class=Group) OR ((Category&Class=User)&givenname is not null)




Page: [1]