Solved

Is there a VB script to remove a user from ALL security groups and distribution lists?

Posted on 2011-03-18
11
514 Views
Last Modified: 2012-05-11
Hello...

Is there a VB script to remove a user from ALL security groups and distribution lists that he/she is a member of?
0
Comment
Question by:qvn7
  • 3
  • 2
  • 2
  • +2
11 Comments
 
LVL 21

Expert Comment

by:Joseph Moody
ID: 35167408
Probably but if you are doing this to one user, why not do it by removing it from all groups it is a member of? Through the AD properties.
0
 

Author Comment

by:qvn7
ID: 35167479
It's just for testing purposes.
0
 
LVL 21

Accepted Solution

by:
Joseph Moody earned 400 total points
ID: 35167487
0
 
LVL 65

Assisted Solution

by:RobSampson
RobSampson earned 100 total points
ID: 35170408
Hi, just so you know, the script that Jmoody10 has pointed to reads users logon IDs from a text file, and removes each user from all groups they are a member of (except the Primary Group).

Rob.
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 74

Expert Comment

by:Glen Knight
ID: 37457722
I've requested that this question be deleted for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 37457723
I recommend that Jmoody10's comment ID 35167487 be accepted.  It will do the job.

Rob.
0
 
LVL 74

Expert Comment

by:Glen Knight
ID: 37457734
You said in your comment "except the Primary Group" this means they will still be a member of that group and therefore not removed from "ALL" Grouos as per the request?
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 37457960
But you can't remove a user from a primary group.  You must have one group set as the primary, and since there is no request to change the primary group, you can't do anything else with it.

Rob.
0
 

Expert Comment

by:Mod_MarlEE
ID: 37478747
Starting the auto-close procedure on behalf of the Question Author, to implement the recommendations from the participating Expert(s).

-----
Everyt'ing is everyt'ing,

Mod_MarlEE
Community Support Moderator
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I know all systems administrator at some time or another has had to create a script to copy file from a server share to a desktop. Well now there is an easy way to do this in Group Policy. Using Group policy preferences is not hard. The first thing …
Installing a printer using group policy preferences is not that hard let’s take a look at it. First lets open up your group policy console and edit the policy you want to add it to. I recommend creating a new policy for each printer makes it a l…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

706 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now