Skip to content

Commit e05cdcf

Browse files
README.md
1 parent 913b17e commit e05cdcf

File tree

1 file changed

+23
-0
lines changed
  • Specialized Areas/Fix scripts/Remove User Groups

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
contribution
2+
A fix script is used to remove inactive users from the specified list of Groups. The script checks for users who have been inactive in the system more than 7 days from the current date and removes them from the respective groups accordingly. If users are inactive within 7 days then users will skip for deletion.
3+
4+
Additionally, if any of these users are assigned to existing open incidents, the "Assigned to" field on those open incidents will be cleared.
5+
6+
Groups:
7+
IT ServiceNow L1 IT ServiceNow L2 IT ServiceNow L3
8+
9+
Fix script Goal:
10+
Fix script 1name - Remove Inactive Users from Groups Record for Rollback - Enable check box
11+
12+
The goal of Fix script is to clean up inactive users from the above mentioned groups in ServiceNow, and unassign anyincidents they were responsible for — but only if they have been inactive for more than 7 days.
13+
14+
Taking Groups sysid in system Property with "," seperator
15+
16+
Queries group members (sys_user_grmember) where the group matches one of the specified groups.
17+
18+
Skips for Active users , Inactive users who were updated in the last 7 days.
19+
20+
Finds Incident assigned to the user that are not closed (assuming state = 3 means closed). Clears the assigned_to field and updates the record.
21+
22+
System Property : Store groups sysid.
23+

0 commit comments

Comments
 (0)