Solved

Script to Provide Information from Domain

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

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
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…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 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