Hi All
i am using exchange 2016 hybrid environment. i want to delete 50 distribution lists which are in exchange onprem. i have aliases in a csv file in the below format. is the below syntax correct. how can i use confirm false. when i delete it should not ask for confirmation.
Aliases
dl1@contoso.com
dl2@contoso.com
dl3@contoso.com
$DLList = import-CSV "C:\list.csv"
ForEach ($item in $DLList){Remove-DistributionGroup -Identity $item.Aliases -BypassSecurityGroupManagerCheck $false}