Solved

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

Posted on 2011-03-18
11
519 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

 
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
 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

705 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