Remove user from multiple Group

Hi All,
Can any one help me on this . 
we have around 100 different  SSLVPN AD security groups. Need a script or command to remove 790 users
from all these groups.
we have list of user in excel sheet we want to remove from group only. 
Regards, Triyambak

Hi,
Just checking in to see if the suggestion was helpful. Please let us know if you would like further assistance.
TechNet Subscriber Support
If you are
TechNet Subscription
user and have any feedback on our support quality, please send your feedback
here.
Regards, Yan Li

Similar Messages

  • Remove user from multiple groups

    Hello everyone, first time posting here with a question and I apologize if I'm asking in the wrong location.
    To give an idea of what I'm attempting to do, I've recently been developing a vbscript that will take a nightly csv export from my student information system and either create or deactivate student accounts based upon their enrollment status.  I have
    this function working great now, another function I've been developing is to have accounts moved between OU's based upon the school building code assigned to students which I have working as well.  The problem I'm running into right now is having students
    removed from existing active directory groups when they move between OU's.  Essentially what I would like to do is have the script load the users group membership into an array and then remove any groups that end with STUDENTS, below is the code I have
    been working on to accomplish this but have literally hit a brick wall.  If it helps all my student groups for each location runs in this fashion.
    ABCD_STUDENTS
    ABCE_STUDENTS
    Any suggestions would be greatly appreciated.
    ' Student changing OU then we need to update their account to reflect appropriate group memberships.
    Set UserObj = GetObject("WinNT://server.domain.net/" & ADusrname) 'This must be hardcoded to domain controller
    strUserDN = DN
    strUserCN = objuser.cn
    'Add user to the school group if not correct
    Set objGroup = GetObject(varSchoolGroup)
    strUserDN = DN ' Bind to the user object.
    strGroupDN = varSchoolGroup ' Specify group Distinguished Name and check for membership.
    Set objADObject = GetObject("LDAP://"& strUserDN)
    objmemberOf = objadobject.GetEx("memberOf")
    If Not (funIsMember (GetObject("LDAP://" & strUserDN),varSchoolGroup)) Then
    objmemberOf = objadobject.GetEx("memberOf")
    For Each objGroup in objmemberOf
    Set objGroupDelete = GetObject ("LDAP://" & objGroup)
    If Mid(objgroup,7,8) = "STUDENTS" Then
    msgbox "test remove"
    objGroupDelete.PutEx ADS_PROPERTY_DELETE,"member",Array(strUserDN)
    objGroupDelete.setinfo
    subUpdateLogFile studentcounter & " - Removed from student group " & objgroup,student_guid,student_username,student_fullname,"removed group"
    End If
    Next
    'Add user to school group
    Set objGroup = GetObject(varSchoolGroup)
    objGroup.PutEx ADS_PROPERTY_APPEND, "member", Array(struserdn)
    objGroup.SetInfo
    subUpdateLogFile studentcounter & " - Updated school group to " & student_schoolgroup_ldap,student_guid,student_username,student_fullname,"school group"
    objUser.SetInfo
    updated = "yes"
    End If
    Any suggestions would be greatly appreciated.

    With Bill.  This can be done with AD and PowerShell in a couple of lines for reach item.
    You are taking an incorrect approach which is making this much harder than it needs to be.  Your question is also hard to understand.
    Each AD usre object obtained via ADSI will have a list of groups the account is a member of.  You use this to remove the user from the group.  How you choose this is up to you.  You can use an array or a file.  You can also =just use
    OU associated groups.  A user then is added to all or some groups associated with the OU and removed from the groups associated with the OU by just returning the OU associated group list from the OUs.
    Designing AD systems is a specialty.  Once you fully understand the features and capabilities of AD these things are usually simple and painless.  If the design is not done well they are painful and faulty.
    We can answer specific questions.  Understaning the design and capabilities of AD is mostly up to you.
    Start with a tool that is designed to work well with AD like PowerShell. VBScritp is onluy useful to those who are skilled with AD and scripting in VBSdcript.  From your script we can see you are a beginner at both.  As Bill notes...do yourself
    a favor and switch to PowerShell.
    ¯\_(ツ)_/¯

  • Unable to remove user from SharePoint Group using PowerShell

    I am trying to remove a user from a SharePoint Group using PowerShell.
    I can see the user in the Site Collection as part of the SharePoint Group, however, when I attempt to run the script, I get an error message stating "Can not find the user with ID: 10"
    Below is the PowerShell script that I am using:
    $url = "https://sharepointdev.spfarm.spcorp.com/sites/desitecoll"
    $userName = "spfarm\sp2013_svc"
    #$userName = "spfarm\spprofileimport";
    $site = New-Object Microsoft.SharePoint.SPSite($url)
    $web = $site.OpenWeb()
    $siteGroups = $web.SiteGroups;
    Clear-Host
    $mySiteGroups = @();
    foreach($group in $siteGroups)
    Write-Host $group
    $mySiteGroups += $group;
    }#foreach
    $members = $web.SiteGroups[$mySiteGroups[0]];
    $owners = $web.SiteGroups[$mySiteGroups[1]];
    $visitors = $web.SiteGroups[$mySiteGroups[2]];
    #Remove the user from the specified SharePoint Group
    $spUser = Get-SPUser -Identity $userName -Web $url
    Write-Host $spUser.ID
    Remove-SPUser -Identity $spUser -Web $url -Group $owners
    $web.Update();
    $web.Dispose();
    Write-Host "User " $userName "removed from " $owners
    Please advise.

    I had to update the code to the following because Get-SPUser was not working properly:
    $url = "https://sharepointdev.spfarm.spcorp.com/sites/desitecoll"
    $userName = "spfarm\spprofileimport";
    $site = New-Object Microsoft.SharePoint.SPSite($url)
    $web = $site.OpenWeb()
    $siteGroups = $web.Groups;
    Clear-Host
    $mySiteGroups = @();
    foreach($group in $siteGroups)
    Write-Host $group
    $mySiteGroups += $group;
    }#foreach
    $members = $web.Groups[$mySiteGroups[0]];
    $owners = $web.Groups[$mySiteGroups[1]];
    $visitors = $web.Groups[$mySiteGroups[2]];
    #Convert the user name to an SPUser account
    $spUser = $web.Site.RootWeb.EnsureUser($userName);
    Write-Host $spUser.ID
    Remove-SPUser -Identity $spUser -Web $url -Group $owners
    $web.Update();
    $web.Dispose();
    Write-Host "User " $userName "removed from " $owners
    Was I not using Get-SPUser correctly?

  • How to Remove User from Built in Administrators group With Group Policy Enabled

    Hi,
    I want to remove user from Administrator group which is in restricted group. So I cannot remove him through Active Directory what is the way to remove user from Administrator restricted group.
    Thanks
    Jibran Ishtiaq

    > Disable Group policy
    "Edit", not "Disable"
    > Under Domain click Delegation and went to the restricted group account.
    > Remove User from group.
    Why "Delegation"? Simply edit the GP object where the "Restricted
    Groups" setting is in place...
    > Also we have two DNS but one from where I remove account is the primary.
    How is DNS related to group policy?
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • Project Server 2013 - Remove user from resource pool via sync

    Hello everyone,
    has anyone managed to configure their Project Server 2013 box with a resource pool sync that will actually remove user from the resource pool (disable "User can be assigned as resource" or deactivate users) when the user is removed from the AD
    group(s)?
    Setup: Single box, SQL 2012 SP1, SharePoint/Project Server 2013 + PU March + CU April. 2 PWA instances, 1 in SharePoint and 1 in Project permission mode. Tried on 2 different machines (different setup, accounts, domains).
    Proceedings:
    Create AD user U, AD group G. Add U to G.
    Go to PWA, setup resource pool sync with G, sync.
    U is now in the resource pool, has no PWA permissions.
    Remove U from G. Resync resoure pool.
    U is still in resource pool, still a resource, still active, can still be assigned as resource.
    Adding U back to G an repeating the whole spiel with a resource pool and a PWA group sync of G will result in U being added and removed from the user list (as expected), and U being added but not removed from the resource pool.
    Having read
    http://technet.microsoft.com/en-us/library/gg982985.aspx and
    http://technet.microsoft.com/en-us/library/gg750243.aspx, there does not seem to be an omission on my part.
    The first article states:
    Note:
    The corresponding Project Server User Account is not deactivated based on this synchronization. If the same Active Directory user is configured to synchronize with a Project Server security group, the Project Server user account will be inactivated when
    that synchronization occurs. For more information, see
    Best practices to configure Active Directory groups for Enterprise Resource Pool synchronization in Project Server 2013.
    Unfortunately, this deactivation either does not seem to occur even with a PWA group sync or I misunderstood the article.
    So, did anyone manage to setup their resource pool sync in a way, that new resource will be added, but also be removed from the resource pool?
    Kind regards,
    Adrian

    Hi Adrian,
    you tried to sync the same AD group that you used for the resource pool sync also with a Project Server permission group?
    And on removal of the user of the AD group the project user/resource is not deactivated? Only removed from the group
    Regards
    Christoph
    Hi  Christoph,
    even though I might have tried that before, I tried it again in several constellations. It didn't change anything. The the user will be properly added to and removed from the PWA group whenever I remove them from the AD group, the use will also stay active
    (but cannot logon without permissions). However, the user will always remain in the resource pool, i.e. the "User can be assigned as resource." checkbox will remain unless it is cleared manually.
    Having re-read the technet articles, none of the scenarios actually seem to descibe or address the process that I require, or maybe I'm just misunderstanding. Let me just try to outline the core issue:
    Add user to AD group. Sync AD group with resource pool. User is now a PWA resource and PWA user.
    Remove user from AD group, but do not deactivate/delete user from AD.
    (Magic happens!)
    User cannot be assigned as ressource in PWA.
    So, is there anything to make this step 3 happen, or is it just not possible to sync users out of the resource pool anymore unless they are deleted/deactivated in AD?
    Kind regards,
    Adrian

  • CSSImport Utility - Remove Users from Groups

    We have a security group that has a few hundred users assigned to the group. When there is a need to remove a user from the group it is difficult to find the user as I have comb through the list to find the user i am trying to remove. Two questions: is there a way to sort the users in the group in Share Services? The second question is can users be removed using the CSSImport utility by specifying the "delete" option in the importexport.properties? Does the "delete" option remove the user from the secuity group and or does it delete it completely from ShareServices? (we are using Hyperion v9.3.0.1.0 Build 5)

    Hi,
    I am not so sure about the sorting but removing users from groups can be done with the CSSImportExport utility, I see you are on 9.3.0, try and get hold of the 9.3.1 version as it is backward compatible to the 9.3.0 version and more stable.
    When removing users from groups, just set your import operation to update
    import.operation=update
    and in your import csv just put the group children elements and the users you want in the group.
    #group_children
    id,group_id,group_provider,user_id,user_provider
    TestGroup,,,UserToKeepInGroup,Native Directory
    This way it will keep the users in the import file and remove the users from the group that are not in the file, also it does not remove the user from shared services only from the group.
    Ok?
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Remove user from group with MaxL

    hello,is it possible to remove a user from all groups he belongs to without knowing these groups?I want to execute a command such as "alter user my_user remove from ALL_GROUPS;"thanks for your help/

    Not sure if it's feesible, but you could use the 'drop user' command to remove the user from the system, which would of course remove them from all groups, then use the 'create user' command to recreate the user and reassign them to the proper groups.Good luck

  • Remove users from Sharepoint site security group

    I have to close a share point 2007 site for all users for an update. I don't have access to CA. the easiest approach is to remove the users from security group and add them back when the site modification is done. All users all under "NT/Aunthenticated
    users" and they are in Members group. I'm just wondering will it cause any issues when adding them back or it can be done in 1 click. Do i need any tweaks from CA side to add them back?
    Any response is appreciated.
     Thanks!

    Once you add the users back to the site, it should work as expected.
    >>Do i need any tweaks from CA side to add them back?
    No i believe, because you are changing the permissions at site level.
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • Who removed user from AD Universal secuirty group

    Hello , i am trying to find who removed user from universal AD group , i checked audit management policy is enabled but some how event is not getting generated or unable to find those events so please help how to find who did that job - removed the user
    from universal security group.
    And suppose if anybody is deleting and the logs should be generated on one of the local site Domain controller is that correct ? so anywhere or it can be generated on the member server. Any free third party tool who can help here .
    Thanks

    Here is another informative technet blog resource that helps to track all the changes made in active directory : http://blogs.technet.com/b/askpfeplat/archive/2012/03/05/how-to-track-the-who-what-when-and-where-of-active-directory-attribute-changes-part-i-the-case-of-the-mysteriously-modified-upn.aspx
    If you wish to audit such changes automatically, you may also consider on this automated solution (http://www.activedirectoryaudit.com/) that would be a better approach to audit all the critical changes
    into real time and get instant notification for through customized email notification.

  • Getting error while removinf user from AD group

    Hi,
    In AD User process definition, there is a default taks called :Remove user from Group. This task runs after another task called Organization Name Update . Whenever, an user is moved from one org to another org, his organization gets updated in AD user form and this task"Remove user from Group" runs. The work of this task is to remove the user from old groups. BUt the task is getting rejected and i see the below error in log files.
    11/07/04 00:24:17 Data AccessException:
    11/07/04 00:24:17 com.thortech.xl.orb.dataaccess.tcDataAccessException: DB_READ_FAILEDDetail: SQL: select UD_ADUSRC_GROUPNAME from UD_ADUSRC where UD_ADUSRC_KEY = Description: ORA-00936: missing expression
    SQL State: 42000Vendor Code: 936Additional Debug Info:com.thortech.xl.orb.dataaccess.tcDataAccessException
    at com.thortech.xl.dataaccess.tcDataAccessExceptionUtil.createException(Unknown Source)
    at com.thortech.xl.dataaccess.tcDataBase.createException(Unknown Source)
    at com.thortech.xl.dataaccess.tcDataBase.readPartialStatement(Unknown Source)
    at com.thortech.xl.dataobj.tcDataBase.readPartialStatement(Unknown Source)
    at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
    at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
    at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
    at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
    at com.thortech.xl.adapterfactory.events.tcAdpEvent.getChildTableFieldValue(Unknown Source)
    at com.thortech.xl.adapterfactory.events.tcAdpEvent.getRunTimeValue(Unknown Source)
    at com.thortech.xl.adapterfactory.events.tcAdpEvent.getRunTimeValue(Unknown Source)
    at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpADREMOVEUSERFROMGROUP.implementation(adpADREMOVEUSERFROMGROUP.java:48)
    If anybody knows the solution for this then plz let me know.
    Thanks,
    Kalpana.

    I think the mappings and all would be correct. Here is what Kevin meant:
    - Let's assume the AD user account is a part of GroupA, GroupB and GroupC
    - Now on Change Organization completion if you invoke Remove user from Group then the adapter/process task has no way to know that which 3 of those groups has to be removed (or all 3 for your case)
    - Alternatively if you use API's to remove the group then this task would be invoked by the original OIM process/triggers and so the actual value would be known to adapter/process task.

  • Essbase cannot union filters from multiple groups

    Hi All,
    I got a problem to provisioning on Shared Service.
    In some case, I need to grant multiple filters to a Essbase users, say user01.
    However, each user can associated one Essbase filter only.
    For better management, I create multiple groups with different filters and assign the user, user01, into the groups.
    For first two groups are working normally. However, Essbase cannot "union" all filters from multiple groups after the users join the third groups.
    However, I try to combine the three filter into a filter with three rows. It is working!!!
    It is because there are large number of users in external LDAP. It is unmanageable when combining multiple filters into a filters. Is there any way to solve this problem? or is there any better approach to do the security ?
    Thanks in advance!!!
    Regards,
    TKC

    Thanks for your reply.
    I have following structure in Essbase. I try to make it simple to understand.
    Dept (dimension)
    |_C00
    |_CTTL
    |_C01
    |_C02
    Project (dimension)
    |_GEN
    |_P01
    |_P02
    |_P03
    |_PI
    |_A
    |_P01 (shared member)
    |_B
    |_P02 (shared member)
    |_P03 (shared member)
    Group A with Filter F01
    Read - CTTL, IDESCENDENT(A)
    Group B with Filter F02
    Read - C01, P01, P02
    User joins A and B group.
    The end result of user is that
    he can access CTTL of P01 only
    he can access C01 of P01 and P02 only
    he cannot access C02 of any Project dimension
    he cannot access CTTL of P03
    However, I found that when I change to metaread. The result is going wrong.
    he can access C01 of P01, P02 and P03 only.
    It is because I need to block user to view members which he cannot access.
    I need "metaread" function.
    So somebody tell me how to achieve this? Thanks in advance.
    Edited by: user070322 on Jan 4, 2009 8:37 PM
    Edited by: user070322 on Jan 5, 2009 6:04 PM

  • HT5760 You need to make the function available to remove yourself from iMessage groups.

    It's so annoying you can't remove yourself from iMessage groups, is this something you will ever allow?

    WE don't have to do anything.
    WE are users.
    WE are NOT Apple.

  • Bulk move users from one group to another in XI 3.1

    Hi all,
    I have a group that contains approximately 20,000 users. I now need to move around 7,500 of these users into a different group.
    How can I do this programatically in bulk as I don't want to go through and manually change the groups of 7,500 users?
    Thanks,
    Chris

    Hi Christian,
    Assuming you would need to move users from one group to another and remove them from the previous group, you could use the attached java code.
    To run the code, you would need to save it as .jsp file and paste it inside AdminTools application context.
    The pre-requisite to run this code is to create a Text file with all the 7500 user names in it. The text file should contain one user per line
    (example:
    User1
    User2
    User3
    You can get this information from query builder by running the below query
    Select top 20000 si_name from ci_systemobjects where si_kind='user'
    Initially do it for 2-3 users to text the results.
    You would need to edit the jsp and modify these three lines
    1.
                    * Assign user to a group
                   //Query for the group ID
                   boQuery = "Select SI_ID From CI_SYSTEMOBJECTS Where SI_KIND='UserGroup' And SI_Name='UserGroup name'";
    Above in SI_NAME, you would need to provide the usergroup name you want your users to be added to.
    2.
    if (boUserInfoObject.getGroups().remove(Group Id from which it has to be removed)) {
                            out.print("User removed from group successfully. ");
    Above you would need to provide the id of the group you want the users to be removed from(i.e the current group from where you want them to be moved).
    3.
    * Path to file containing User names.
    final String USER_FILE_PATH = "<Path of txt file from which list of users will be imported>";
    Above you need to specify the path of the text file which contains all the user names.
    Incase you require further assistance on SDKs, raise your concerns in the below space
    http://scn.sap.com/community/bi-platform/java-sdk
    Thanks,
    Prithvi

  • How am I able to add and remove people from a group message?

    How am I able to add and remove people from a group message?

    You'd need to start a new thread.

  • Remove keywords from multiple pictures -  how to??

    REMOVING keywords from multiple images doesn't work here on Aperture 2.1.1. I select multiple pictures, remove a common keyword from the list in the Metadata inspector and... only the keyword from the picture which I selected last is being removed. All other pictures still have the keyword attached. Edit > Primary Only is not 'turned on'.
    What did I miss?

    Go to 'Window' > 'Show Keyword Controls'.
    In the text box, write the keyword that need to be removed from all selected images and press SHIFT + ENTER.
    If you use the Keyword Button Sets, you can also click on the keyword to be removed while holding down the SHIFT- key.
    Regards
    Paul K

Maybe you are looking for

  • Installed iOS 8.1.3 on iPhone 6 and Apple TV Remote App no longer works

    After installing 8.1.3 and rebooting, the Apple TV Remote App stopped working. I can tap to select options, but cannot swipe or gesture to move to other options. Rebooted Apple TV and iPhone 6, no change. No other apps were affected.

  • How to know the name of the perform

    I would like to have the name of the perform in an abap program. Ex : Form f333_form. write: / 'I''m in the form', w_namef. enform. w_namef should contain f333_form. Like in debug (stack list). regards, Christophe

  • Problem in using stmt- getFloat()

    Hi, I have an application which makes use of OCCI for connectivity with the Oracle 9i.. My application is able to perform updation insertion etc.. But when I get a problem with the following sql statement.. Before I write the code let me explain what

  • Lookups and BC4J

    How can I get BC4J to handle my look ups without including the key value in the form? I'd like to be able to just show the value, without the key value, but, of course, have the key value be inserted into the main table. Anyone doing this? Joe

  • Notification won't turn off!

    Turned on audible notification for emails before Xmas, turned it off on January 2nd, but it keeps going on!!!  Anything to do with the DND bug which goes away on January 7th?