Solved

How to create dynamic Groups in Active Directory (not dynamic Distribution List)

Posted on 2006-07-21
8
8,633 Views
Last Modified: 2009-07-01
Hello,

is there a way to create groups dynamically based on office location, department, title etc?

there is solution to create dynamic distribution list, but would need to create dynamic groups.

thanks.
0
Comment
Question by:swisscommerce
8 Comments
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17158936
IMHO unless you are talking about using a third party tool, probably syncing AD with a HR system or the like I can't see that working directly.

I suppose you could write some nifty scripts which do LDAP queries onto the directory or query another database for the details and then re-populate the members of a group on a schedule.

Are the attributes you mention already in AD now?  What do you intend to use the groups for?

Can you get a distribution group with all the correct users into it dynamically already?  In which case maybe a simple script to take all the members of distgroupa and update groupb?
0
 
LVL 26

Expert Comment

by:Pber
ID: 17160044
You can't do this for security groups unless you use a 3rd party tool or scripting as dragon-it mentioned.
0
 

Author Comment

by:swisscommerce
ID: 17160297

1. yes, the attributes are already in AD, such as office first name, last name, email, phone, fax, mobile, title, department, office address, city and country for each user.

2. the groups will be used for multiple web based applications, portals etc that require us to create groups. We are able to create dynamic groups directly from those applications with user attributes taken directly from active directory. But instead of creating one and the same group in each application, we prefer to create the group ONCE in AD and have all applications to use the same group from AD. Makes sense?

right now, AD allows you to create groups, however, the group members needs to be added and updated manually as new employees are added or removed, which is very time consuming for larger number of users.

3. yes, we are able to create dynamic distribution groups with the correct users already. But what script can we use to convert those distribution list to create the groups? even if we can run that script once a day to update the groups, it will do the job.
0
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 

Author Comment

by:swisscommerce
ID: 17160363
or can you recommend any 3rd party that does that?
0
 
LVL 43

Accepted Solution

by:
Steve Knight earned 500 total points
ID: 17161506
I presume these are standard AD dist groups?  In which case you could do something with a scheduled batch file perhaps?

net group "Your Dist List name" should retutn the members of that group
You can use

net group "groupname" /add name to add them to another group.

If you have spaces in some usernames things could be difficult but if you don't this might work, seems OK in my own quick tests.  You could so similar to delete all group members first too.

@echo off
for /f "skip=6 tokens=*" %%A in ('net group "dist group" ^|find /v "command completed"') do call :process %%A
goto end

:process

set fullline=%*

net group "access group" /add %fullline%

:end

To delete group members:

@echo off
for /f "skip=6 tokens=*" %%A in ('net group "access group" ^|find /v "command completed"') do call :process %%A
goto end

:process

set fullline=%*

net group "access group" /delete %fullline%

:end
0
 

Expert Comment

by:super3
ID: 21918902
the NET GROUP command does not return any Dynamic Distribution Groups.

It only returns security groups.


0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This may not be a text book method to resolve VSS backup issues but it seemed to have worked on few of the Windows 2003 servers we had issues while performing a Volume Shadow Copy backup. If you have issues while performing a shadow copy backup usin…
Numerous times I have been asked this questions that what is it that makes my machine log on so slow, there have been cases where computers took 23 minute exactly after taking password and getting to the desktop. Interesting thing was the fact th…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now