Solved

Script to Provide Information from Domain

Posted on 2011-03-03
3
237 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
3 Comments
 
LVL 13

Accepted Solution

by:
connectex earned 200 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 150 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 51

Assisted Solution

by:Bill Prew
Bill Prew earned 150 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

Join & Write a Comment

Synchronize a new Active Directory domain with an existing Office 365 tenant
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
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 …

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now