We are looking at automating the task of granting and revoking Windows network share permissions to certain users (apprentices) that move through different departments in the company. Each time they leave one department their access to the shares should be revoked and access to the shares of the new department granted. We already know the weeks and times that they move around today.
I was thinking of writing a script with a config file including the users, shares and a timetable. Then this script should be run on each first day of the week and check whether someone should be granted or revoked a right.
Any ideas how to best approach that and if that makes sense or if it is too much of an effort and should rather be done manually?