Solved

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

Posted on 2011-03-18
11
515 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 22

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 22

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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

[b]Ok so now I will show you how to add a user name to the description at login. [/b] First connect to your DC (Domain Controller / Active Directory Server) SET PERMISSIONS FOR SCRIPT TO UPDATE COMPUTER DESCRIPTION TO USERNAME 1. Open Active …
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
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…
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 from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

920 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

12 Experts available now in Live!

Get 1:1 Help Now