Get the App
SLTechnology News&Howtos  ›  Servers  › 

Bulk delete distribution and security groups

Shulou Source: shulou.com Published: 2022-06-03 05:10:01 10月03日 Update

The following simple script can implement how to delete distribution groups, mail groups, and security groups in batches.

Create a new file for CSV, the first line of which is mail. Here is the script

Import-Csv C:\ delg.csv | foreach {

Remove-ADGroup $_ .mail-Confirm:$false

}

Tags: Scripts security communications distribution groups lines content files messages Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft MariaDB NVidia Xiaomi macOS