?
Solved

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

Posted on 2011-03-18
11
Medium Priority
?
521 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 1600 total points
ID: 35167487
0
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 
LVL 65

Assisted Solution

by:RobSampson
RobSampson earned 400 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

This article shows the method of using the Resultant Set of Policy Tool to locate Group Policy that applies a particular setting.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses
Course of the Month11 days, 16 hours left to enroll

752 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