?
Solved

Script to Provide Information from Domain

Posted on 2011-03-03
3
Medium Priority
?
244 Views
Last Modified: 2012-05-11
Hi Experts,

I would like to know if anyone knows of a script I can use that can retrieve the following information from a specified MS Active Directory domain:

*List of all OUs and their Sub OUs

*For each OU, list all users, computers, and groups

*For each user, computer, or group, list of security and distribution group memberships

Thanks for your help!
0
Comment
Question by:Joe_27
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 13

Accepted Solution

by:
connectex earned 800 total points
ID: 35034007
You can do this quite easily with ldifde.exe utility. That's included with Windows. Her'e's Microsoft support article on it: http://support.microsoft.com/kb/237677. Here's some basic examples.

ldifde -f all_info.txt

ldifde -f users.txt -r "(objectClass=user)" -l name,memberof,mail,proxyaddresses,scriptPath,homedrive,homedirectory,profilepath,mDBOverHardQuotaLimit,mDBOverQuotaLimit,mDBStorageQuota,mDBUseDefaults

ldifde -f computers.txt -r "(objectClass=computer)" -l displayname

ldifde -f groups.txt -r "(objectClass=group)" -l name,member

ldifde -f public_folders.txt -r "(objectClass=publicfolder)"

ldifde -f printers.txt -r "(objectClass=printqueue)"

ldifde -f shares.txt -r "(objectClass=volume)" -l name,uncname
0
 
LVL 14

Assisted Solution

by:luconsta
luconsta earned 600 total points
ID: 35034028
If you are really need a VB script to do this job you could use the Microsoft's Technet Script Repository where you could find a lot of scripts that do this job.
0
 
LVL 56

Assisted Solution

by:Bill Prew
Bill Prew earned 600 total points
ID: 35035804
You might want to take a look at ADFIND and the other tools at the URL below, it's a great free tool for these types of queries.

http://joeware.net/freetools/


~bp
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
Active Directory can easily get cluttered with unused service, user and computer accounts. In this article, I will show you the way I like to implement ADCleanup..
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question