Skip to content

Commit 637d6a5

Browse files
README.md
1 parent ce0dbee commit 637d6a5

File tree

1 file changed

+33
-0
lines changed
  • Specialized Areas/Fix scripts/Delete User Groups

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# contribution
2+
3+
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.
4+
If users are inactive within 7 days then users will skip for deletion.
5+
6+
Additionally, if any of these users are assigned to existing open incidents, the "Assigned to" field on those open incidents will be cleared.
7+
8+
Groups:
9+
--------
10+
11+
IT ServiceNow L1
12+
IT ServiceNow L2
13+
IT ServiceNow L3
14+
15+
16+
Fix script Goal:
17+
-----------------
18+
19+
Fix script 1name - Remove Inactive Users from Groups
20+
Record for Rollback - Enable check box
21+
22+
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.
23+
24+
25+
Taking Groups sysid in system Property with "," seperator
26+
27+
Queries group members (sys_user_grmember) where the group matches one of the specified groups.
28+
29+
Skips for Active users , Inactive users who were updated in the last 7 days.
30+
31+
Finds Incident assigned to the user that are not closed (assuming state = 3 means closed). Clears the assigned_to field and updates the record.
32+
33+
System Property : creation for group sysid.

0 commit comments

Comments
 (0)