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
Solved

Script to Provide Information from Domain

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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
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 Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

809 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