DL Manage

Version 3.0.0

Free Download

Easily schedule and automate AD group membership changes with this command line tool
If you ever need to add or remove users from security groups or distribution lists from the command line then this little application should help you out. With a simple user friendly syntax, it is easy to create a batch file or script that uses this program to add or remove users from groups.

Features
Simple command line syntax
Add specific users to security groups or distribution lists
Remove specific users from security groups or distribution lists
Remove all users from security groups or distribution lists
Specify multiple group names to modify more than one group at once
View current group members
Writes to log file so that you can see the result of any scheduled executions of the program


Command Line Syntax

DLManage.exe [Add/Remove/ViewMembers/ClearAll] [Args]

Add
Adds a user to the distribution lists or security groups specified
Syntax: DLManage.exe Add [Username] [GroupName]
Example: DLManage.exe Add dsmith SalesReps

Remove
Removes a user from the specified distribution list or security group
Syntax: DLManage.exe Remove [Username] [GroupName]
Example: DLManage.exe Remove dsmith SalesReps

ClearAll
Removes all users from the specified security group or distribution list
Syntax: DLManage.exe ClearAll [GroupName]
Example: DLManage.exe ClearAll "Accounts Users"

ViewMembers
Outputs the names of all members of the specified security group or distribution list to the console window
Syntax: DLManage.exe ViewMembers [GroupName]
Example: DLManage.exe ViewMembers "Accounts Users"

Multiple group names can be specified for any of the above commands by separating group names with a comma (no space before or after the comma). If any group names contain spaces then the group must be enclosed in speech marks, as shown in the above example.

Log File
Each time DLManage runs it will write to a file named DL-Log.txt in the same directory that the application is being run from (if the file does not already exist it will be created automatically). This file will contain details of any changes made or any errors encountered and should be reviewed after each execution of the program if you were not able to see the on screen output (for example if the app is set to be run on a scheduled task).

Screenshots

Help text
Adding a user to a group
Removing a user from 3 groups (one group does not exist)
Viewing the members of 2 groups
Removing all users from 2 groups

As always, I'm interested to hear if this program is useful to you or if you have any problems with it, so feel free to send me an email letting me know what you think.