Solved

Need to remove multiple DL's and security groups

Posted on 2016-11-10
2
68 Views
Last Modified: 2016-11-11
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
Comment
Question by:A D
2 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 41882077
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
 

Author Closing Comment

by:A D
ID: 41883632
Thanks Subsun. Worked perfectly!!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Worried about if Apple can protect your documents, photos, and everything else that gets stored in iCloud? Read on to find out what Apple really uses to make things secure.
The new Gmail Phishing Scam going around is surprising even the savviest of users with its sophisticated techniques.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question