Scenario:
I receive a termination form for each leaving employee. It has the date of termination (this is the date on which I have to disable the employee account) and 30 days from the date of termination, I have to delete the user account. This is the process that is to be followed in our organization.
Issue:
The number of users are more and the number of terminations at one point in time was more than 100. (These include user accounts that has to be disabled on termination date and those user accounts that has to be deleted after 30 days of termination). It is a tiring task to check for all the forms for the date of termination and then disable or delete a account.Was not able to disable or delete accounts on accurate dates.
Work Around :
Once there is a form for termination,
for eg:
Leaving Employee : Gagarin
D.O.T : 01.01.2010
Account to be deleted on: 02.02.2010
Step 1:
-make Gagarin, a member of the group , say -- "Termination"
-Set the D.O.T as the expiry date of the user account (01.01.2010 in this case).
Function of the script on the group "Termination":
1.Check if,
CurrentDate = ExpiryDate
if Yes, disable account
2.Check if,
CurrentDate = ExpiryDate + 30
if yes, delete account
***********************************************************************
This is the exactly what I am trying to do.
*****************************************************************
Please suggest.