• RSS
  • Twitter
  • FaceBook

Exchange Server Forums

Forums | Register | Login | My Profile | Inbox | RSS RSS icon | My Subscription | My Forums | Address Book | Member List | Search | FAQ | Ticket List | Log Out

LDIFDE Export

Users viewing this topic: none

Logged in as: Guest
  Printable Version
All Forums >> [Microsoft Exchange 2003] >> General >> LDIFDE Export Page: [1]
Login
Message << Older Topic   Newer Topic >>
LDIFDE Export - 26.Jan.2009 11:27:37 AM   
andyturn

 

Posts: 12
Joined: 17.Nov.2008
Status: offline
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"
Post #: 1
RE: LDIFDE Export - 26.Jan.2009 1:57:34 PM   
tiallen

 

Posts: 278
Joined: 26.Jan.2006
From: Minneapolis MN
Status: offline
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"

_____________________________

Tim Allen
http://www.linkedin.com/in/timallen

(in reply to andyturn)
Post #: 2
RE: LDIFDE Export - 27.Jan.2009 9:40:09 AM   
andyturn

 

Posts: 12
Joined: 17.Nov.2008
Status: offline
That worked!!! Thanks Tim. I am guessing the pipe is basically an "and"?

(in reply to tiallen)
Post #: 3
RE: LDIFDE Export - 27.Jan.2009 10:03:28 AM   
tiallen

 

Posts: 278
Joined: 26.Jan.2006
From: Minneapolis MN
Status: offline
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)

_____________________________

Tim Allen
http://www.linkedin.com/in/timallen

(in reply to andyturn)
Post #: 4

Page:   [1] << Older Topic    Newer Topic >>
All Forums >> [Microsoft Exchange 2003] >> General >> LDIFDE Export Page: [1]
Jump to:

New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Follow TechGenix on Twitter