Solved

Script to Provide Information from Domain

Posted on 2011-03-03
3
239 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 53

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

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
A brief introduction to what I consider to be the best editor for PowerShell.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
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 …

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