Re: Export Usernames and Email Addresses

From: Herb Martin (news_at_LearnQuick.com)
Date: 02/10/05


Date: Thu, 10 Feb 2005 11:50:30 -0600


"Dave B" <dbenivegna@sargentlock.com> wrote in message
news:125d01c50f8b$3413f0c0$3a01280a@phx.gbl...
> Hello,
>
> I am trying to export usernames and email addresses from a
> particular user group in Active Directory. I can export
> users from the group using the NET GROUP command in DOS but
> that doesn't include email addresses. Do I have to use a
> LDAP query or is there an easier way to do it?

Well in some sense yes but you can probably use the Win2003
DSGet command -- it is far more capable than the Net commands.

    DSGet user /?

( -email = address seems promising)

You may also need to combine this with a preliminary DSQuery User
to get all of the User names for processing by DSGet.

I.E., DSQuery finds the users, DSGet displays the attributs for a
particular (set of) user(s).

DSQuery user /?

You can also look into the ADSI ScriptOMatic by searching
Microsoft for it....

    Google: [ site:microsoft.com ADSI ScriptOMatic ]

(It helps (non-) programmers write useful scripts.)



Relevant Pages

  • Re: Password never expires
    ... You can do that with the DSGET command: ... Display the various properties of a user in the directory. ... There are two variations of this command. ... -part Connect to the directory partition with the ...
    (microsoft.public.windows.server.active_directory)
  • RE: Listing all the users in a group
    ... To simplify the process of ... getting the DN you can use the dsquery command: ... use the DN in the dsget command. ...
    (microsoft.public.win2000.active_directory)
  • Re: dsget limitations
    ... adding -expand and also checking the version of dsget you are using. ... > I am talking about the dsget command. ... If the cn=usergroup has a lot of members, ... >> If you did mean dsquery, then the default does limit the results to 100 ...
    (microsoft.public.windows.server.active_directory)
  • Re: Dsget bug for more than 1,000 members ? What else can I use.
    ... Are you saying that this is the script that can make dsget -member work with ... modify size limit and page size ... > object in memory, ... >> command line I can use to accomplish the same that I would ...
    (microsoft.public.win2000.active_directory)
  • RE: User Principal Name
    ... Or, if you are able to get your hands on dsquery and dsget, try this from ... the command-line: ... dsquery user -name JohnDoe | dsget user -upn ... MCITP | Server/Enterprise Admin ...
    (microsoft.public.windows.vista.administration_accounts_passwords)