Got a small request on removing multiple Distribution groups from a csv file
Just get the CSV file in the Above format
Import-Csv C:\RemoveDG.csv
make sure CSV file is in the below format
Now Run
Import-csv C:\RemoveDG.csv | foreach{Remove-distributiongroup $_.RemoveDG}
It removes the Distribution groups containing in the CSV file
Use -Confirm Switch if you want to avoid prompts
—
To Disable Distribution Groups from a list Contains in CSV file
Import-csv C:\RemoveDG.csv | foreach{Disable-distributiongroup $_.RemoveDG}
Thank you