Friday, November 16, 2012 4:56 PM
I have already deployed a script which adds users to a group as soon as they are moved to (or created in) one particular OU. I am, however, struggling to create one which removes any users from that group should they leave the OU. For example, if someone moves from that business area to another, we don't want them to retain membership of that particular group. I am looking for a short, efficient script which would do this.
Can anyone help me please??
Friday, November 16, 2012 5:17 PMModerator
The VBScript below is based on a similar question some time ago, to enforce group membership based on the OU where the user resides. You must run the script periodically:
Do you somehow trigger a script to run when a users is moved?
Richard Mueller - MVP Directory Services
- Marked As Answer by MancunianMan Sunday, November 18, 2012 10:11 AM
Sunday, November 18, 2012 10:15 AM
That's fantastic; thank you so much. :o)
In the case of the script I already have in place, I simply use Scheduled Tasks to run it every morning. So doing the same with your script should suffice. I'll give it a go!