Solved

Automatically Join Computers in an OU to a security group

Posted on 2013-01-11
9
1,964 Views
Last Modified: 2013-01-14
Hello, in our domain we have multiple offices across the country. Each of these offices has it own OU, eg London, Manchester, Liverpool etc.

Each Citys OU contains child OUs for objects eg Users, Laptops, Desktops, Security Groups, Distribution Groups etc

I have a security group that is for the whole of the domain, what I want to do is automatically make any laptop in every city City a member of the security group.

Is there a way to do this? I would mind a powershell script running every so often. ut it would be nice to be able to put in some sort of policy that forces a member of an OU into a group.
0
Comment
Question by:infradatel
  • 4
  • 3
  • 2
9 Comments
 
LVL 21

Expert Comment

by:Joseph Moody
Comment Utility
Try this:

Get-QADComputer -SearchRoot "OU=NAMEOF OU,OU=NAMEOFCITYOU,DC=Test,DC=local" | Add-QADGroupMember "TEST\GROUPNAME"

You will need to specify the search root to each laptop OU. You will also need the Quest AD CMDLets.

http://www.quest.com/powershell/activeroles-server.aspx
0
 
LVL 21

Expert Comment

by:Joseph Moody
Comment Utility
Set it up as a scheduled task and you are good to go!
0
 

Author Comment

by:infradatel
Comment Utility
Is there a way to do this without installing the Quest Modules?
0
 
LVL 21

Accepted Solution

by:
Joseph Moody earned 400 total points
Comment Utility
Yes - if you have a 2008 R2 web services, you can use the AD builtin powershell cmdlets.

Just replace qad- with ad-

The Quest Modules are very nice though and super simple! You just need them on a workstation.
0
Do email signature updates give you a headache?

Do you feel like all of your time is spent managing email signatures? Too busy to visit every user’s desk to make updates? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today!

 

Author Comment

by:infradatel
Comment Utility
Ok thanks will go e it a try now I have a server with web services on
0
 
LVL 53

Assisted Solution

by:McKnife
McKnife earned 100 total points
Comment Utility
Hi.

Have a look at the concept of shadow groups. http://www.youtube.com/watch?v=HMixa01i78g In the descriptive text, a script is linked.
0
 

Author Closing Comment

by:infradatel
Comment Utility
With the help of both of you I have managed to get this working as required, using shadow groups I have even managed to get it to automate deletion of computers removed from the OU. THanks Guys.
0
 
LVL 21

Expert Comment

by:Joseph Moody
Comment Utility
Awesome!

If you can, post your script. Others may find it useful!
0
 
LVL 53

Expert Comment

by:McKnife
Comment Utility
Could you do all you wanted using shadow groups?
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

Suggested Solutions

Set OWA language and time zone in Exchange for individuals, all users or per database.
OfficeMate Freezes on login or does not load after login credentials are input.
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…

763 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

5 Experts available now in Live!

Get 1:1 Help Now