Quantcast
Channel: Exchange 2013 – azure365pro.com
Viewing all articles
Browse latest Browse all 170

Remove Distribution Groups from a list Contains in CSV file

$
0
0

Got a small request on removing multiple Distribution groups from a csv file

image

Just get the CSV file in the Above format

Import-Csv C:\RemoveDG.csv

make sure CSV file is in the below format

image

Now Run

Import-csv C:\RemoveDG.csv | foreach{Remove-distributiongroup $_.RemoveDG}

image

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

Satheshwaran Manoharan

Exchange MVP , Publisher of CareExchange.in
I have been supporting Microsoft Exchange for some years . Thanks for your visit . Please share you thoughts via Comments
For Feedback or Improvements : Admin@careexchange.in
Thank you

LinkedIn Google+ Skype 


Viewing all articles
Browse latest Browse all 170

Trending Articles