Command query to list all users in an Active directory group

A situation occured when I needed to email everyone in a specific Active Directory group. To help with this activity it would be nice to determine the users easily. I used the Dsquery command line tool to help with this. The following  command helped:

dsquery group -name "<ad-group>" | dsget group -members -expand | dsget user -email

By replacing the <ad-group> with the active directory group that you want to send the email to and running the command all the user emails are listed. This allowed me to copy and paste the user emails to outlook and send on the message.