If we want to remove all mail distribution groups, how can we do that? I think this looks working, Get-DistributionGroup | Remove-DistributionGroup , when I execute this cmdlet , it returns “Confirm” message to verify it.
What about this cmdlet? Get-DistributionGroup | Remove-DistributionGroup -Confirm:$true , but this cmdlet works same to ask “Confirm” message , but if we make Get-DistributionGroup | Remove-DistributionGroup -Confirm:$false , it deletes all distribution groups which I have,
Normally if we use Remove-DistributionGroup cmdlet, it requires Identity parameter , and if we try to remove multi users , we are making csv file to set column to UserPrincipalName to extract each rows, but in this case also require Identity parameter, I wanted to make remove all mail distribution groups without Identity paramemter. What is meaning of “Confirm” parameter , Confirm parameter is Optional , whether to show or hide the confirmation prompt. -Confirm:$false : You can skip the confirmation prompt by using this exact syntact ,