VBScript program demonstrating how to read user NT names from a text file and add the users
to a group. The text file name and the group name are passed to the program as arguments.
The program uses the WinNT provider to bind to the group and user objects.
The NetBIOS domain name is hard coded in the program. The program checks that two arguments have been specified. Otherwise a syntax message is displayed. The program handles invalid text file names and invalid user names. The program CreateUserList1.vbs can be used to create the text file of user NT names. The text file should be edited to only include the names desired. The user NT name is the sAMAccountName of the user, also called the pre-Windows 2000 logon name.
This program should work on any 32-bit Windows client that can log onto the domain. Windows NT and Windows 98/95 clients should have DSClient installed. If DSClient is not installed, they need WSH and ADSI installed.
AddToGroup1.txt <<-- Click here to view or download the program