Member of Tab

I wanted to know if there might be a shortcut to save time as far as adding/deleting MEMBER OF settings for about 20 users who don't exactly are supposed to have the same groups within this setting.  We apparently don't use any templates for this and we need to do them manually.
Who is Participating?
Krzysztof PytkoConnect With a Mentor Senior Active Directory EngineerCommented:
OK, so this should not be named member of tab :) because this tab holds user group membership.

To fill those fields you can also use MS DS Tools but I need to know an example file with input data for users in your environment :(what you want to add and how it is organized within a file) ) Then I will provide proper syntax for you

Thank you in advance

If I understand your question correctly, you could, instead of editing each users member of tab, edit the groups members and take those out/add whomever is applicable.
Krzysztof PytkoSenior Active Directory EngineerCommented:
Sure, you can simply use Microsoft DS Tools to achieve that.

create a users text file on a DC with their logins


and save this as users.txt on C-Drive

On a DC run that query to remove users from group
for /f %i in (c:\users.txt) do dsquery user -samid %i | dsmod group "GroupDistinguishedName" -rmmbr -c

Open in new window

to get group DN run
dsquery group -name "GroupName"

Open in new window

and put it into syntax above.

To add, replace -rmmbr switch with -addmbr
for /f %i in (c:\users.txt) do dsquery user -samid %i | dsmod group "GroupDistinguishedName" -addmbr -c

Open in new window

vulture71Author Commented:
So here's an example of what I'm trying to accomplish.  I have two separate user accounts (User tabs) and I would like to mimic each others settings.  How do I go about this?  For security reasons, we do not create template accounts.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.