none
Adding machine to Correct OU during Auto Join Domain

    Question

  • Adding machine to Correct OU during Auto Join Domain

    Any Group policy and any script ?


    Gurmeet Singh

    Tuesday, December 23, 2014 8:13 AM

Answers

All replies

  • I think best practice is still to precreate the ad computer account objects in the desired location. This also eleviates the need for the operator account to have privileges to create AD objects.

    http://support.microsoft.com/kb/315273 shows an example script that creates the computer account in an OU of choice and then joins the computer to it.

    Also, when joining AD through powershell, you can specify the OU where the object will be created

    http://technet.microsoft.com/en-us/library/hh849798.aspx


    MCP/MCSA/MCTS/MCITP



    • Edited by SenneVL Tuesday, December 23, 2014 8:25 AM
    • Proposed as answer by SenneVL Tuesday, December 23, 2014 10:06 AM
    • Marked as answer by Mandy YeModerator Wednesday, January 7, 2015 6:15 AM
    Tuesday, December 23, 2014 8:22 AM
  • Any group policy Adding machine/Any computer to Correct OU during the Domain Joining ?

    Gurmeet Singh

    Tuesday, December 23, 2014 8:29 AM
  • You can use Powershell,

    "add-computer -domainname <domain> -cred <domain\administrator> -Passthru -OUPath "OU=xxx,DC=<Domain>,DC=<Domain>

    Replace the parameters with you're domain values.


    Darshan

    Tuesday, December 23, 2014 8:31 AM
  • if any Group policy or not ?

    Adding machine/Any computer to Correct OU during the Domain Joining ?


    Gurmeet Singh

    Tuesday, December 23, 2014 8:37 AM
  • Even for a Group Policy to work the machine must be first joined to the domain.

    So is you're requirement to move existing machines (already joined) to a specific OU?


    Darshan

    Tuesday, December 23, 2014 8:58 AM
  • GPO only applies to already joined computers.

    You can reconfigure the default OU for computers if you want all new account to be in a specific OU.

    http://technet.microsoft.com/en-us/library/cc770619.aspx


    MCP/MCSA/MCTS/MCITP

    Tuesday, December 23, 2014 10:08 AM
  • I have One Domain controller and three ADC Server on different locatin.

    My query is  if one computer (Mumbai Location) is joining the domain this computer is automatically move to specific OU (Mumbai OU) it is possible or not ?


    Gurmeet Singh



    • Edited by Gurmeet57a Tuesday, December 23, 2014 11:30 AM
    Tuesday, December 23, 2014 11:25 AM
  • I have One Dc and Three ADC Server and my query is  if one computer (Mumbai Location) is joining the domain this computer is automatically move to specific OU (Mumbai OU) it is possible or not ?

    Gurmeet Singh

    Tuesday, December 23, 2014 11:57 AM
  • As suggested by SenneVL you can change the default location only. This means all computers instead of going to the computer OU will go to the location specified by you. But you cannot selectively choose the computer ou depending on location at the time of joining.

    You can move them later through powershell or gpo only after it is joined to domain first

    Reg,


    Darshan

    Tuesday, December 23, 2014 12:17 PM
  • I have One Dc and Three ADC Server and my query is  if one computer (Mumbai Location) is joining the domain this computer is automatically move to specific OU (Mumbai OU) it is possible or not ?

    There is nothing built-in to AD to do this for you, but, you can pre-create the computer objects as previously suggested, or, other alternatives such as use a webservice on a server like this:

    https://mdtcustomizations.codeplex.com/releases/view/43988


    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

    Wednesday, December 24, 2014 12:58 AM
  • I have One Dc and Three ADC Server on different location

    My query is  if one new computer (Mumbai Location) is joining the domain (xxxx.com) 

    This computer is automatically exist/move to selected OU (Mumbai-OU) it is possible or not ?


    Gurmeet Singh

    Wednesday, December 24, 2014 4:43 AM
  • Hi,

    As suggested by SenneVL you can only change the default location to a specified, target OU. After that any new computer joined to the domain (xxxx.com) will be automatically exist/move to the same specifice OU.

    Best Regards,

    Mandy 

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, January 2, 2015 7:13 AM
    Moderator
  • Best practice is to pre-create the computer account in AD before joining to domain.

    In other way .. you can use power-shell cmdlet :

    "add-computer -domainname <domain> -cred <domain\administrator> -Passthru -OUPath "OU=xxx,DC=<Domain>,DC=<Domain>

    Friday, January 2, 2015 8:56 AM
  • Gurmeet,

    Did you explored using unattended installation where you have already defined the OU location, do you folks use any 3rd party tool to build these VM's, you can either use the pre-created computer object in AD (manual) or join them to domain - which will go to default computer OU in AD and then move them back at one in required OU - manual or use the powershell to add them and move them during the domain joining - manual, was wondering if you have explored to use a 3rd party tool which can any of the above during the joining of the machine to domain.

    GPO will come into picture when you already have a computer part of AD - this will not work here.


    Inderjit

    Friday, January 2, 2015 9:18 AM
  • You should run redircmp.exe to configure default OU for auto join computers to domain, once for domain.
    Monday, October 30, 2017 5:56 AM