Auto Disable the Service Accounts due to inactivity#1646
Conversation
This schedule job script will help to auto disable the service accounts which has not been logged in or used for last 40 days.
This file gives the information about the above file for auto disabling the service accounts
ravichandra1998g
left a comment
There was a problem hiding this comment.
Hello Abhishek,
Transaction logs table is one of the largest tables in the instance which stores all the user/background transactions.
querying it for the last 40 days would have performance implications on the system.
Can you optimize the script for the performance?
ravichandra1998g
left a comment
There was a problem hiding this comment.
The script seems to print an array of user names,
Please modify it as per the description. (auto disabling)
This is for disabling the Service account due to inactivity
|
Hello @ravichandra1998g , Thanks for the validation. As requested, I have made some certain changes by optimizing the performance impact. Not this looks good from my end in terms of system performance. Please review it and let me know, if any changes are required. |
|
This applies to all the users as there is no filter to include only service accounts.. please add the filter. |
This code helps to disable the service account due to inactivity for last 30 days.
|
Hello @ravichandra1998g , Again, thanks for the validation. I have applied the filter for only service account. Please validate it and let me know, if anything needs to be changed. |
This schedule job script will help to auto disable the service accounts which has not been logged in or used for last 30 days. This can be helpful for those who are looking to disable the accounts based on some certain time period.