Export Users From One Domain To Another

Bruce Ringler 61 Reputation points
2021-03-06T13:59:26.857+00:00

Hello I have two air-gaped networks, one Server 2012 R2 and one Server 2019, my customer asked if users from the 2012 R2 can exported to moved to the Server 2019 domain. These are two physically different networks with different OU naming structures, is this a simple process? Thanks Bruce

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Andreas Baumgarten 103.8K Reputation points MVP
    2021-03-06T14:20:16.293+00:00

    If it's just export/import users these two links might help:

    https://networkproguide.com/powershell-export-active-directory-users-to-csv/

    https://sid-500.com/2020/11/03/powershell-import-active-directory-users-from-csv/


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten

    0 comments No comments

  2. Rich Matheisen 45,831 Reputation points
    2021-03-06T18:58:07.177+00:00

    You can create new users in the other domain. Those users are going to have different SIDs, different userPrincipalNames, different distinguishedNames, etc. The groups in which they are members won't have them as members in the new domain so forget about maintaining the memberOf property value of the users.

    Because the two domains can't communicate with each other the different SIDs won't matter (and there's always the old sidHistory property to help if there is communications -- but whether that'll work without a trust I can't say). Group membership will be a problem, especially if you have nested groups.

    If you do create new users (not difficult) you can count on things not working properly for a while. And count on possibly creating new groups and adding those new users to them).

    0 comments No comments