Presently, I use the following to remove a named user from all distribution groups:
Get-DistributionGroup | Remove-DistributionGroupMember -Member username@domain.com
The problem with the above is that it attempts to remove the user from all DG's (not just the ones for which they are a member). This is inefficient but gets the job done.
I'm consulting this forum because I want to perform the above against a list of users in a CSV.
Use case: Batches of temporary employees sometimes leave organization and I want to process in bulk.
All help is appreciated! Thanks in advance,
Sean-Colin