@ECHO OFF REM CopyGroupMembersToGroup.cmd REM For copying the members of one group to another. REM 20100827, v1. REM 20120621, v2. REM Added FOR loop so the script doesn't quit on the first account that already is a member of both groups. @ECHO ON FOR /F "tokens=*" %%S IN ('dsget group %1 -members') DO ( dsmod group %2 -addmbr %%S )