Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > VB Script to enumerate users in only select groups

Reply
Thread Tools Display Modes

VB Script to enumerate users in only select groups

 
 
Mike
Guest
Posts: n/a

 
      05-04-2011
How would I go about creating a VB script to enumerate specific groups
in two separate Active Directory domains:

Domains:
na.contoso.com
eu.contoso.com

Groups:
Exx - Managers
Exx - Employees

The group names will always begin with the letter E and will always be
followed by 2 numbers. So, the possibilities are E00 through E99.

The script would then need to export all of the user accounts from
these groups and write them to two separate text files called
managers.txt and employees.txt (with their full DN paths).

I then need to import the managers.txt into a group called Managers
and employees.txt into a group called Employees.

Then, delete the users from their old groups and then delete the
groups.

Any ideas on how I would go about doing this?
 
Reply With Quote
 
 
 
 
Junior Member
Join Date: Apr 2011
Posts: 13

 
      06-21-2011
you can use the dsget command

To display the list of members with nested groups | Windows Tricks

more then one group use the for command

Windows Tricks: oneline script

Regards,
Windows Tricks
FeedBurner Email Subscription
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SBS 2008 RWW Arvis Holland Windows Small Business Server 0 10-07-2010 01:55 PM
Trouble installing Windows XP SP3 and other MS updates DanP Windows Update 27 08-18-2010 09:34 PM
Groups Greg Active Directory 5 06-08-2010 05:58 PM
VB Script to update users desktop short-cuts when migrating Michael Windows Small Business Server 1 05-31-2010 08:37 PM
Standard Users Privileges Sam Windows Vista Administration 15 07-06-2007 07:22 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59