Bulk delete distribution and security groups
The following simple script can implement how to delete distribution groups, mail groups, and security groups in batches.
Create a new file for CSV, the first line of which is mail. Here is the script
Import-Csv C:\ delg.csv | foreach {
Remove-ADGroup $_ .mail-Confirm:$false
}