Results 1 to 7 of 7

Thread: CSVD export of SMTP addresses

  1. #1
    randy Guest

    CSVD export of SMTP addresses

    I am attempting to export a list of all usernames and smtp email addresses
    fromt LDAP. I have the following command which works, except for the fact
    that it keeps exporting the Distinguished name, even though I don't ask it to
    do so. Is there a way where I can limit it to just export the two fields I
    want?

    csvde -r "(objectClass=user)" -d "ou=accounting,ou=domain user
    accounts,dc=corp,dc=domain,dc=com" -l "cn,mail" -f c:\email.csv

  2. #2
    \RemS Guest

    RE: CSVD export of SMTP addresses

    "randy" wrote:

    > I am attempting to export a list of all usernames and smtp email addresses
    > fromt LDAP. I have the following command which works, except for the fact
    > that it keeps exporting the Distinguished name, even though I don't ask it to
    > do so. Is there a way where I can limit it to just export the two fields I
    > want?
    >
    > csvde -r "(objectClass=user)" -d "ou=accounting,ou=domain user
    > accounts,dc=corp,dc=domain,dc=com" -l "cn,mail" -f c:\email.csv


    Use DSQuery.exe instead of csvde,
    http://www.petri.co.il/forums/showthread.php?t=18464&highlight='Saved%20Queries

    Or use a vbscript,
    http://www.petri.co.il/forums/showthread.php?t=19411

    \Rems

  3. #3
    Richard Mueller [MVP] Guest

    Re: CSVD export of SMTP addresses


    "\RemS" <RemS@discussions.microsoft.com> wrote in message
    news:42C4C20C-4547-4BE1-9F93-3755237D41A8@microsoft.com...
    > "randy" wrote:
    >
    >> I am attempting to export a list of all usernames and smtp email
    >> addresses
    >> fromt LDAP. I have the following command which works, except for the fact
    >> that it keeps exporting the Distinguished name, even though I don't ask
    >> it to
    >> do so. Is there a way where I can limit it to just export the two fields
    >> I
    >> want?
    >>
    >> csvde -r "(objectClass=user)" -d "ou=accounting,ou=domain user
    >> accounts,dc=corp,dc=domain,dc=com" -l "cn,mail" -f c:\email.csv

    >
    > Use DSQuery.exe instead of csvde,
    > http://www.petri.co.il/forums/showthread.php?t=18464&highlight='Saved%20Queries
    >
    > Or use a vbscript,
    > http://www.petri.co.il/forums/showthread.php?t=19411
    >
    > \Rems


    Just to elaborate, the csvde command always outputs the DN, whether you ask
    for it or not. The reason is that DN uniquely identifies the objects. Note
    that the cn attribute does not. There could be several objects in the domain
    with the same value assigned to cn, they just need to be in different OU's
    or containers. Another attribute that will uniquely identify the users (in
    the domain) is sAMAccountName (pre-Windows 2000 logon name). That might be a
    better choice.

    --
    Richard Mueller
    Microsoft MVP Scripting and ADSI
    Hilltop Lab - http://www.rlmueller.net
    --



  4. #4
    randy Guest

    RE: CSVD export of SMTP addresses

    I have tried this command, however it results in returning names from all
    ou's, how can I limit to specifc OU's for searching?

    cmd /c dsquery.exe * -limit 0 -filter
    "(&(objectCategory=person)(objectClass=user)(mail=*))" -attr name mail
    >"c:\PrimaryEmailAddresses.txt"


    "\RemS" wrote:

    > "randy" wrote:
    >
    > > I am attempting to export a list of all usernames and smtp email addresses
    > > fromt LDAP. I have the following command which works, except for the fact
    > > that it keeps exporting the Distinguished name, even though I don't ask it to
    > > do so. Is there a way where I can limit it to just export the two fields I
    > > want?
    > >
    > > csvde -r "(objectClass=user)" -d "ou=accounting,ou=domain user
    > > accounts,dc=corp,dc=domain,dc=com" -l "cn,mail" -f c:\email.csv

    >
    > Use DSQuery.exe instead of csvde,
    > http://www.petri.co.il/forums/showthread.php?t=18464&highlight='Saved%20Queries
    >
    > Or use a vbscript,
    > http://www.petri.co.il/forums/showthread.php?t=19411
    >
    > \Rems


  5. #5
    \RemS Guest

    RE: CSVD export of SMTP addresses

    enter the DN of the ou as <startnode>.
    http://www.jsifaq.com/SF/Tips/Tip.aspx?id=7330
    The DN must be between quotes.
    And maybe? you might also want to use the parameter: -scope onelevel

    cmd /c dsquery.exe * "OU=name3,OU=name2,OU=name1,DC=domain,DC=local" -scope
    onelevel -limit 0 -filter
    "(&(objectCategory=person)(objectClass=user)(mail=*))" -attr name mail
    >"c:\PrimaryEmailAddresses.txt"


    \Rems

    "randy" wrote:
    > I have tried this command, however it results in returning names from all
    > ou's, how can I limit to specifc OU's for searching?
    >
    > cmd /c dsquery.exe * -limit 0 -filter
    > "(&(objectCategory=person)(objectClass=user)(mail=*))" -attr name mail
    > >"c:\PrimaryEmailAddresses.txt"

    >
    > "\RemS" wrote:
    >
    > > "randy" wrote:
    > >
    > > > I am attempting to export a list of all usernames and smtp email addresses
    > > > fromt LDAP. I have the following command which works, except for the fact
    > > > that it keeps exporting the Distinguished name, even though I don't ask it to
    > > > do so. Is there a way where I can limit it to just export the two fields I
    > > > want?
    > > >
    > > > csvde -r "(objectClass=user)" -d "ou=accounting,ou=domain user
    > > > accounts,dc=corp,dc=domain,dc=com" -l "cn,mail" -f c:\email.csv

    > >
    > > Use DSQuery.exe instead of csvde,
    > > http://www.petri.co.il/forums/showthread.php?t=18464&highlight='Saved%20Queries
    > >
    > > Or use a vbscript,
    > > http://www.petri.co.il/forums/showthread.php?t=19411
    > >
    > > \Rems


  6. #6
    devina Guest

    Re: CSVD export of SMTP addresses

    I am 38 years old and have no money. ? I have so many debts. I am a disabled experienced person and I heard that I may be qualified to receive a grant to use in conjunction with my down payment or in lieu of a down payment to assist me in home ownership. Is this true I am looking for any housing grant. Is there any one who can help me? Thank you very much.

  7. #7
    Pegasus \(MVP\) Guest

    Re: CSVD export of SMTP addresses (Spam)

    Putting out spam messages won't win you any friends.



Similar Threads

  1. Replies: 1
    Last Post: 08-06-2012, 06:41 PM
  2. Export Names and Email Addresses from Thunderbird
    By Mustafa k in forum Technology & Internet
    Replies: 5
    Last Post: 13-01-2011, 07:40 AM
  3. Export email addresses from mail?
    By The!Winston in forum Technology & Internet
    Replies: 5
    Last Post: 21-10-2010, 09:01 AM
  4. SMTP communication problem smtp;550 - emails bouncing back
    By Antonio00 in forum Small Business Server
    Replies: 1
    Last Post: 03-04-2008, 01:05 AM
  5. Export Usernames and Email Addresses
    By settler in forum Active Directory
    Replies: 3
    Last Post: 11-02-2005, 03:28 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,719,298.60463 seconds with 17 queries