RE: Export all smtp addresses to .txt file
- From: Umesh Thakur <UmeshThakur@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 10 Feb 2006 15:21:28 -0800
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?
- Follow-Ups:
- RE: Export all smtp addresses to .txt file
- From: Umesh Thakur
- RE: Export all smtp addresses to .txt file
- Prev by Date: RE: Remote File Sharing - Multiple Directories on W2K/W2K3 Servers
- Next by Date: [MSH]add-member question
- Previous by thread: RE: Remote File Sharing - Multiple Directories on W2K/W2K3 Servers
- Next by thread: RE: Export all smtp addresses to .txt file
- Index(es):
Relevant Pages
|