RE: Export all smtp addresses to .txt file

Tech-Archive recommends: Fix windows errors by optimizing your registry



Try running these dsquery commands to display output on screen. If you can
see the output on command window, you can also redirect it to a text file:

dsquery * -filter "&(ObjectCategory=User)" -scope subtree -attr
name


dsquery * -filter "&(ObjectCategory=User)" -scope subtree -attr
sAMAccountName, name

Bydefault, dsquery will not return more than 100 records. to override this
limit, use -limit <num>
where <num> is new limit. like, 1000

dsquery * -filter "&(ObjectCategory=User)" -scope subtree -attr
sAMAccountName, name -limit 1000



--
"C is a razor-sharp tool, with which one can create an elegant and efficient
program or a bloody mess."
Replace C with VBScript :)



"Rob S" wrote:

I run the command as just as you have it and I get this message:
"Dsquery has reached the default limit of 100 results to display: use the
-limit option to display more results"

Also, when I look at the text file that I cat the output into, the only
thing in there is:
"name,proxyAddresses"

Any ideas? I appreciate the help


"Rob S" wrote:

Thanks alot. I'll give this a try.


"Umesh Thakur" wrote:

If you're using WINDOWS 2003, you can use command below to export all email
addresses to a text file:

dsquery * -filter "&(ObjectCategory=User)" -scope subtree -attr
name,proxyAddresses

this will list user name and e-mail addresses in command window. do pipe the
output to a text file using:

dsquery * -filter "&(ObjectCategory=User)" -scope subtree -attr
name,proxyAddresses > d:\test.txt

Or, use the article below to export AD objects using LDIFDE util:
--------------------------------------------------------------------------
Using LDIFDE to Import and Export Directory Objects to Active Directory
http://support.microsoft.com/default.aspx?scid=kb;en-us;237677
--------------------------------------------------------------------------

--
"C is a razor-sharp tool, with which one can create an elegant and efficient
program or a bloody mess."
Replace C with VBScript :)



"Rob S" wrote:

It's been awhile since I've done anything with LDAP. Can you tell me how to
do an LDAP export, or point me somewhere that I could read up on it?
Thanks.



"Jason" wrote:

Do an Ldap export of the smtp address and the user names.

"Rob S" wrote:

I'm trying to figure out an easy way to pull all smtp addresses stored in AD,
and export them to a text file.

Any ideas?


.



Relevant Pages

  • Re: color of strings
    ... A simple way is to use error instead of using disp. ... I want to display a string in the command window without ... function error ends the current process and ... returns control to the command window; ...
    (comp.soft-sys.matlab)
  • Re: Cannot attach sharepoint databases
    ... Please run the following command in the command window: ... then it will display a notation 1>, ... Then, 2> will display, ... This posting is provided "AS IS" with no warranties, ...
    (microsoft.public.windows.server.sbs)
  • Re: Which domain contoler did I authenticate against
    ... Cary W. Shultz ... Roanoke, VA 24012 ... > Simply have the user open a command window and enter SET at the prompt. ... > know one of the entries will display the DC that the user is logged into. ...
    (microsoft.public.scripting.vbscript)
  • Re: Label font color change doesnt take effect
    ... I think this may be a case of the Command Window not showing what is ... In other cases it may even display a wrong ... This is the correct format. ... the color of the font ...
    (microsoft.public.dotnet.framework.windowsforms)