locked
Create a user account on multiple domains RRS feed

  • Question

  • I have three different domain controller on my network Production, development and testing. I want to create the same user account in to these three domain controllers without logging in to each DC. Is there a way to achieve this via power shell scripting or by some other way?
    Tuesday, July 10, 2012 6:48 AM

Answers

  • I have three different domain controller on my network Production, development and testing. I want to create the same user account in to these three domain controllers without logging in to each DC. Is there a way to achieve this via power shell scripting or by some other way?

    Hello,

    First of all, it is impossible to create exactly the same user in three domains since the SID will be different for the three ones. Anyway, you can use dsadd user command: http://technet.microsoft.com/en-us/library/cc731279%28v=ws.10%29.aspx and then re-run the same on the different domains.


    This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.   

    Microsoft Student Partner 2010 / 2011
    Microsoft Certified Professional
    Microsoft Certified Systems Administrator: Security
    Microsoft Certified Systems Engineer: Security
    Microsoft Certified Technology Specialist: Windows Server 2008 Active Directory, Configuration
    Microsoft Certified Technology Specialist: Windows Server 2008 Network Infrastructure, Configuration
    Microsoft Certified Technology Specialist: Windows Server 2008 Applications Infrastructure, Configuration
    Microsoft Certified Technology Specialist: Windows 7, Configuring
    Microsoft Certified Technology Specialist: Designing and Providing Volume Licensing Solutions to Large Organizations
    Microsoft Certified IT Professional: Enterprise Administrator
    Microsoft Certified IT Professional: Server Administrator
    Microsoft Certified Trainer


    • Edited by Mr XMVP Tuesday, July 10, 2012 12:20 PM
    • Marked as answer by Andy Qi Monday, July 16, 2012 9:00 AM
    Tuesday, July 10, 2012 12:19 PM
  • Hi,

    I agree with Mr x, we could add a new user account into AD with the Dsadd command line tool. We could refer to the article he provided for detailed information about Dsadd command line tool. Additionally, we could also create a user with PowerShell. Please refer to the article below for details about creating user via PowerShell.

    Creating a User

    http://technet.microsoft.com/en-us/library/dd378958(v=ws.10).aspx

    If you want to create a large amount of same user accounts once in the three domains, I suggest we could create a CSV file includes information about all of the users first and we could just import it to the domain. For details, please refer to the following article.

    Import Bulk Users to Active Directory

    http://blogs.technet.com/b/bettertogether/archive/2011/01/09/import-bulk-users-to-active-directory.aspx

    In addition, the article about managing user via PowerShell may be useful to us. Please refer to it for details about how to manage user account via PowerShell.

    User Management

    http://technet.microsoft.com/en-us/library/dd391974(v=ws.10)

    Regards,

    Andy

    • Proposed as answer by Sandesh Dubey Wednesday, July 11, 2012 3:09 AM
    • Marked as answer by Andy Qi Monday, July 16, 2012 9:00 AM
    Wednesday, July 11, 2012 3:02 AM

All replies

  • If you are looking for assistance with scripting/PowerShell ,you might want to refer to the below forum

    http://social.technet.microsoft.com/Forums/en/winserverpowershell/threads

    http://social.technet.microsoft.com/Forums/en-US/category/scripting


    Best Regards,

    Sandesh Dubey.

    MCSE|MCSA:Messaging|MCTS|MCITP:Enterprise Adminitrator | My Blog

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    • Proposed as answer by Meinolf Weber Tuesday, July 10, 2012 7:39 AM
    Tuesday, July 10, 2012 7:12 AM
  • As per my understanding, yes you can. If you have trust relation being establish between all the 3 domains, you can simply use ADUC/ADAC tool to achieve that w/o actually required to login to the system.


    Awinish Vishwakarma - MVP - Directory Services

    My Blog: awinish.wordpress.com

    Disclaimer This posting is provided AS-IS with no warranties/guarantees and confers no rights.

    Tuesday, July 10, 2012 9:21 AM
  • I assume you want to create an account from one script run, you won't find this in any one script.  You will have to copy a script and then run the update three time against the three different domains.  The Script Center has several scripts on how to create a user, I have a user provisioning tool but it is extremely complex so it probably isn't what you want.
    http://gallery.technet.microsoft.com/scriptcenter/site/search?f%5B0%5D.Type=RootCategory&f%5B0%5D.Value=activedirectory&f%5B0%5D.Text=Active%20Directory

    My provisioning tool
    http://blogs.dirteam.com/blogs/paulbergson/archive/2011/04/27/how-to-create-a-new-active-directory-user.aspx

    --
    Paul Bergson
    MVP - Directory Services
    MCITP: Enterprise Administrator
    MCTS, MCT, MCSE, MCSA, Security+, BS CSci
    2008, Vista, 2003, 2000 (Early Achiever), NT4
    http://www.pbbergs.com    Twitter @pbbergs
    http://blogs.dirteam.com/blogs/paulbergson

    Please no e-mails, any questions should be posted in the NewsGroup. This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, July 10, 2012 11:59 AM
  • I have three different domain controller on my network Production, development and testing. I want to create the same user account in to these three domain controllers without logging in to each DC. Is there a way to achieve this via power shell scripting or by some other way?

    Hello,

    First of all, it is impossible to create exactly the same user in three domains since the SID will be different for the three ones. Anyway, you can use dsadd user command: http://technet.microsoft.com/en-us/library/cc731279%28v=ws.10%29.aspx and then re-run the same on the different domains.


    This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.   

    Microsoft Student Partner 2010 / 2011
    Microsoft Certified Professional
    Microsoft Certified Systems Administrator: Security
    Microsoft Certified Systems Engineer: Security
    Microsoft Certified Technology Specialist: Windows Server 2008 Active Directory, Configuration
    Microsoft Certified Technology Specialist: Windows Server 2008 Network Infrastructure, Configuration
    Microsoft Certified Technology Specialist: Windows Server 2008 Applications Infrastructure, Configuration
    Microsoft Certified Technology Specialist: Windows 7, Configuring
    Microsoft Certified Technology Specialist: Designing and Providing Volume Licensing Solutions to Large Organizations
    Microsoft Certified IT Professional: Enterprise Administrator
    Microsoft Certified IT Professional: Server Administrator
    Microsoft Certified Trainer


    • Edited by Mr XMVP Tuesday, July 10, 2012 12:20 PM
    • Marked as answer by Andy Qi Monday, July 16, 2012 9:00 AM
    Tuesday, July 10, 2012 12:19 PM
  • Hi,

    I agree with Mr x, we could add a new user account into AD with the Dsadd command line tool. We could refer to the article he provided for detailed information about Dsadd command line tool. Additionally, we could also create a user with PowerShell. Please refer to the article below for details about creating user via PowerShell.

    Creating a User

    http://technet.microsoft.com/en-us/library/dd378958(v=ws.10).aspx

    If you want to create a large amount of same user accounts once in the three domains, I suggest we could create a CSV file includes information about all of the users first and we could just import it to the domain. For details, please refer to the following article.

    Import Bulk Users to Active Directory

    http://blogs.technet.com/b/bettertogether/archive/2011/01/09/import-bulk-users-to-active-directory.aspx

    In addition, the article about managing user via PowerShell may be useful to us. Please refer to it for details about how to manage user account via PowerShell.

    User Management

    http://technet.microsoft.com/en-us/library/dd391974(v=ws.10)

    Regards,

    Andy

    • Proposed as answer by Sandesh Dubey Wednesday, July 11, 2012 3:09 AM
    • Marked as answer by Andy Qi Monday, July 16, 2012 9:00 AM
    Wednesday, July 11, 2012 3:02 AM