- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2015 06:41 AM
I want to make sure that all the user which are currently logged in should be locked out before starting my maintenance work.
Is it possible by anyway using script or anything ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2015 07:23 AM
Ravish,
It does not kick current users out but prevents them from logging back in. Used in combo with Alex's suggestion that should do what you need.
var gr = new GlideRecord('v_user_session');
gr.addEncodedQuery('user!=YOURIDHERE');
gr.query();
while(gr.next()){
gr.locked = true;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2015 06:49 AM
Hi Ravish,
check this out
Managing User Sessions - ServiceNow Wiki
You can do the same for multiple users at a time by selecting all in the list view and using the list view action drop down to lock them out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2015 06:53 AM
Hi Ravish,
Write a glide record against "v_user_session" table and make the record "locked" except yours and run it.
That's it.
try and let me know if any issue.
Thanks,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2015 06:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2015 07:03 AM
This app includes user logout which are currently logged in ???