[Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 423
  • Last Modified:

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.
  • 2
1 Solution
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 PytkoActive 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.
Krzysztof PytkoActive 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


Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now