every1isevil2
asked on
DSQUERY FOR USERS
I need a script that does the following:
-Generate a list of all users my domain and save to a text file
-It must NOT list the user account that have been disabled
I am not too concerned with how pretty the output file looks as I will use Excel to import it into a workbook. So the following format is ok:
-Generate a list of all users my domain and save to a text file
-It must NOT list the user account that have been disabled
I am not too concerned with how pretty the output file looks as I will use Excel to import it into a workbook. So the following format is ok:
"CN=Charles Ross,CN=Users,DC=mogan,DC=local"
Wow, I just tried this. It is AWESOME! It will do everything you ask and more. You can edit the fields as necessary.
Ok, I see you have the disabled disclaimer in there. Let me see what I can do.
ASKER
Thank you for the fast reply.
After looking at the code, which is quite nice, I am afraid that it does not meet either of my requirements. I need it to send it to: a) text file and b) leave out disabled user accounts.
Please submit syntax/code.
After looking at the code, which is quite nice, I am afraid that it does not meet either of my requirements. I need it to send it to: a) text file and b) leave out disabled user accounts.
Please submit syntax/code.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Its actually set for stalepassword of 0, so it will get everybody.
Try this site:
http://www.visualbasicscript.com/m_29830/tm.htm
Copy the text and then save it as a .vbs file
They have a great example that will go to excel.
HTH