on 04-03-2014 4:39 PM
Hello All,
I am planning to delete the Bulk Users (2500) from environment, I need a script or Excel Macro to perform it in my environment.
Please someone provide the JSP script or Excel Macro to perform the activity. Thank you so much in advance.
Thanks,
Srikanth Y
Hello Srikanth,
There are many scenarios by which you can delete users in bulk using SDK. One such scenario, I am sharing over here.
Attached is a sample code which deletes the users by reading the list from a txt file.
The text file has to be placed in the C: directory with one username per line.
You can get the required username list from the query builder.
Hope this helps.
Thanks,
Prithvi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Prithvi,
Thank you so much for your prompt response.
Can you please provide me the steps to perform in environment? Yes, I have the inactive User List.
Where should I place and how to run this script in environment? do i need to rename this to .jsp and need to place it in InfoViewApp war file under the webapps folder and need to run it from IE?
Thanks,
Srikanth
You should have the list of inactive users.Right?
It will always read the usernames from the txt file which will be entered by you and delete those user accounts.
You would need to save the attached sample as .jsp and can place it inside InfoViewApp application.
Also it would be best to test the code in a DEV/TEST environment before you actually try to touch your prod systems.
Try for few user accounts first and check the status.
Also it would be apt to take a back of your CMS DB before you run any script so that you can rollback to a save point.
Thanks,
Prithvi
Hello Prithvi,
I want to disable the "N" no of users before deletion of "N" no of users, do we have any script to disable the multiple users at a time in XIr3 (BO 3.1)? if yes, can you please provide the same.
Also, regarding the deletion of Bulk users deletion, hope you tested the script from your end.
Thank you in advance.
Regards,
Srikanth Y
Thank you Prithvi.
As per the below query, the Admin and Guest accounts won't be disabled right?
users = infoStore.query("SELECT * " + " FROM CI_SYSTEMOBJECTS " + " WHERE SI_KIND='User' " + " and SI_NAME not in ('Administrator', 'Guest')");
So, in the query i need to update the USER ID's which I am not planning to disable, so that the active Users won't be disabled.
Suggest me.
Thanks,
Srikanth
Try o run the query in query builder(Admin Tools) application.
When you run the above query it will return all the user accounts aprt ropm admin and guest.
The list of users you get as an output in the query builder will be disabled if above query is run.
Now you would need to construct a SQL query as per your users list and use that query in the code.
Thanks,
Prithvi
Hi Nivedita,
You can run the following query to get the last logged in time for an user.
select SI_UPDATE_TS from ci_systemobjects where si_kind ='User' and si_name ='Administrator'.
From this you can determine who are all active.
If you have audit enabled in your system, then you can also get this from the activity universe.
Regards,
Subramanian S.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.