Avatar of dougdog
dougdog
 asked on

Dynamic Security Groups In AD

is it possible to create dynamic security groups in AD based on say extensionattribute1?
i need to create a group and have it automatically populated
SecurityActive DirectoryWindows OSMicrosoft Server OS

Avatar of undefined
Last Comment
McKnife

8/22/2022 - Mon
yo_bee

Unfortunately this is only viable for distribution groups
McKnife

I haven't done it, but what should work: create a script and have it run on your DC every x minutes using a scheduled task.
The powershell script would read that attribute for all user objects and i present or if set to a defined value, add that user to the group if not already in it.

Will work, but don't ask me for the syntax.
ASKER CERTIFIED SOLUTION
Peter Hutchison

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
yo_bee

I liked Peter's method, but there is one caveat that needs to be aware of.  Security groups will not apply until you logoff and back on.  

So if you changed a users attributes and they are added to the group via the Powershell and Schedule task the computer that they are on will not know they are part of that group until they logon again.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
McKnife

But that will apply to methods.
McKnife

As if I hadn't suggested the same right before :-)