• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 118
  • Last Modified:

Need to remove multiple DL's and security groups

I need to bulk remove many security groups and DL's. Security groups and DL's are located in different OU's.

Can someone help me with a script?.

Thanks in advance!!
0
P S
Asked:
P S
1 Solution
 
SubsunCommented:
If you are asking to delete groups from AD then use Remove-ADgroup
Example.. If you have a list of groups to remove in a text file, use following code to remove them from AD..
GC C:\temp\groups.txt | %{Remove-ADgroup $_}

Open in new window

0
 
P SAuthor Commented:
Thanks Subsun. Worked perfectly!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now