AD Query (Help!)
I'm trying to pull member info on certain groups for a SOX audit with dsquery at the command line and I'm pulling my hair out with DSQuery commands. I need to know what users are in the groups under a given OU and if they are disabled or not. Like so: ADGroup UserDN UserSamAccountname UserFirstname UserLastName UserDisabled I really just need select groups in the OU but I can easily weed out the ones I don't want if i can just get it in this form. I've tried pulling the group names and putting them in a text file, then parsing that text file with a FOR loop and pulling membership but it always fails because the groups contain other groups. So the "dsget user" throws a fit and kills the whole operation. I tried using dsquery * but it won't let me specify all the things I need - certain OU, certain properties, etc. Any good AD query tools out there maybe?
September 23rd, 2009 12:05am

Still plugging away on this and every time I try to pull a group's membership, I get the error "dsget failed:A referral was returned from the server." if i can get past that, I can get what I need... Anyone seen it?
Free Windows Admin Tool Kit Click here and download it now
September 23rd, 2009 12:52am

Hi Qu4rk, You can use ADExploer.exe GUI utility to query Active Directory information as you wish. Active Directory Explorer http://technet.microsoft.com/en-us/sysinternals/bb963907.aspx Hope this can be helpful. This posting is provided "AS IS" with no warranties, and confers no rights.
September 28th, 2009 2:36pm

Try these steps on the OU from where you are trying to pull users information:Please note down the "Distinguished Name" of the DL in question 1. Please note down the "Distinguished Name" of the DL in question here. (For Eg.: CN=DL,CN=users,DC=domain,DC=com). 2. Open the ADUC. 3. Right Click on Saved Queries New Query Define Query 4. Select "Users, Contacts or Groups" from the drop down. 5. Select the "advance" tab. 6. Click "Field" User Member Of is exactly Paste the DN here. Click ADD OK. OK once again to come out. 7. Refresh the screen. You should see the users now. 8. Click on VIEW Add /Remove columns Select First Name, Last Name, Email Address. 9. Arrange it in the order that you like. 10. Right Click the query and choose "export list" to export the screen contents to a CSV file. Raj
Free Windows Admin Tool Kit Click here and download it now
September 28th, 2009 3:36pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics