If you have ever had to add a bunch of AD users to groups in mass, doing it by hand would take hours. Below I show a script you can run to help automate the process.
In this example I created text file in C:\ call "list.txt" with the names of the users that I wanted to insert into groups, then I simply create a batch (.bat) script with the code above and it will loop over each line, making the group in the default container.
The format of the list.txt in my example would be like this:
Hope this helps, if so leave a note below and let others know!