Subscribe to Windows IT Pro
December 11, 2006 12:00 AM

Add or Remove AD Users

Windows IT Pro
InstantDoc ID #94354
Rating: (0)
Downloads
94354.zip

As an Active Directory (AD) administrator, I often receive requests to add or remove users from various groups. I dislike AD's GUI for adding and removing users; I wanted a quicker solution that requires fewer clicks.

I wrote the Membership.vbs script (which you can download at Instant-Doc ID 94354) to quickly and easily add or remove oneWindows NT user ID at the command prompt. The command runs in the CScript command shell, and the command syntax is:

membership.vbs <user NT ID>
  <pre-Win2K group> <+ / -> 

To add an NT ID (ntid1) into a global group (globalgrp1), type:

membership ntid1 globalgrp1 + 

To remove ntid1 from globalgrp1, type:

membership ntid1 globalgrp1 

To add multiple NT IDs, you can use the Microsoft Windows NT Server 4.0 Resource Kit tool usrtogrp.exe. This tool doesn't let you remove multiple NT IDs.

Related Content:

ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.