Link to home
Create AccountLog in
Avatar of Kelly Garcia
Kelly GarciaFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Active Directory Automation

Hi All,

when we create users, we have to manually put the user in the in the correct OU based on the location of the user, e.g. the user is based in Singapore, we put the user in the Singapore ou. we also have to add the user to specific groups etc.

is there a way to automate this process?

thank you in advance,
Avatar of Irwin W.
Irwin W.
Flag of Canada image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
If you always fill out identifying fields in AD like location, you can run a scrript to evaluate that and perform the necessary changes.
Avatar of Kelly Garcia


the problem is we will have to run these scripts manually, is there a way the script is automatically triggered as soon as the account is created?
You always trigger that manually in one or the other way. But you cannot trigger something automatically if a user is created.
Your best choice is to use a script to create the user and perform all necessary operations, similar to what nappy_d showed.
Agreed with @Qlemo.

You would have some planning to do but based on the start I've sampled in my original post, it would be best if you had nested security, as well as role-based permissions, for your security groups.

This would assist with the script for creation of new users.

I can also show you how you can implement if statements for a feature command called if member.
I know there are utitlies like active roles, that  run scripts upon user creation. are there any others that you will recommend?
Quest makes some great tools but this is not one that I've used.
Avatar of Sam Bloom
Sam Bloom

It really depends on the complexity of the task that you want to automate. If it's a small environment, a PowerShell script can be perfectly ok, but if you have long provisioning procedures with lots of rules to follow, there are advanced tools that let you put it all together.