I am trying to untangle or AD groups. My though was to use WinBatch to go through a group, read each member and if it is a user/computer account, record to a text file. If the member is a nested group, open that up and read through the members, performing the same function - write the user/computer account to a file or traverse the nested group.
I can get most of this but I am having trouble getting WinBatch to tell me whether an object is a user, a computer or a group. Basically, how do I query the object class?
Re: How to Determine Whether Group or User?
If you are interested in getting the the groups, nested groups and primary group for each user you can simply use the ADSI extender's dsGetUsersGrps function. You can find out more about the function in the Consolidated WIL Help file, if you have installed the extender.
That was it. Thank you! I was using "object class" instead of "objectclass".
Where can I get a list of these property names so I get the syntax correct going forward?
You can use the extender's 'dsGetPropName' function to get a list of the property names associated with an object.
I hide things from myself using the same method!