Avatar of LTWadmin
LTWadminFlag for United States of America

asked on 

Active Directory Query help

Windows 2003 Server, SP2. Can anyone paste in a simple query needed to show all user's, contacts and their respective container/group memberships?
Windows Server 2003Active Directory

Avatar of undefined
Last Comment
sirbounty
ASKER CERTIFIED SOLUTION
Avatar of sirbounty
sirbounty
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of LTWadmin
LTWadmin
Flag of United States of America image

ASKER

Thanks. I apologize though - how would I run this?
Avatar of sirbounty
sirbounty
Flag of United States of America image

Save it as EnumUsers.vbs
then make these modifications:

If you want a different output file, change this line:
strFileName="C:\Output.csv"

Then simply double-click on it - if you have root access, it should produce your output (may take a bit though, since it recursively searches the enitre domain)
Avatar of LTWadmin
LTWadmin
Flag of United States of America image

ASKER

Dude - you win (it ran) but do you have anything handy that might break out security groups as well?  It listed these (top level only) but doesn't show me who's in them...  These are the top level container names - they all have sub containers in which people are assigned

LTW GROUPS
DISTRO GROUPS
SECURITY GROUPS

For example:
LTW GROUPS
   ---DISTROGROUPS
       ---Groups
           - People assigned
    ---Security Groups
       ---Groups
           - People assigned.
Avatar of sirbounty
sirbounty
Flag of United States of America image

No, I don't have anything like that (haven't seen the need yet)...sorry.
Avatar of LTWadmin
LTWadmin
Flag of United States of America image

ASKER

OK well as cool as your script is - it doesn't do everything I need it to do at the moment so I'll just let this simmer for a bit to see if anyone might also have a suggestion.  I will award you points though based on what we see happen.  Thanks again.
SOLUTION
Avatar of Erik Pitti
Erik Pitti
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of sirbounty
sirbounty
Flag of United States of America image

modguy - Annie get you working, did she?  Haha...just curious why you're doing cleanup recommendations now....

I'm okay with the decision, unless the author returns to close this themself.
Windows Server 2003
Windows Server 2003

Windows Server 2003 was based on Windows XP and was released in four editions: Web, Standard, Enterprise and Datacenter. It also had derivative versions for clusters, storage and Microsoft’s Small Business Server. Important upgrades included integrating Internet Information Services (IIS), improvements to Active Directory (AD) and Group Policy (GP), and the migration to Automated System Recovery (ASR).

129K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo