locked
Importing AD accounts from a child domain using a CSV file RRS feed

  • Question

  • Hello everyone,

    anyone can help me provinding a powershell to import AD accounts from a child domain using a CSV file to another child domain, please?

    Thank you.

    Wednesday, July 22, 2020 6:13 PM

All replies

  • Greeting Luizmg,
    There are many scripts on the Internet that will do what you ask.  Please iuses your search engine to find them.
    Note that this is not a script request forum.  It is only for questions about a script you have written.
    But,I can really give you some suggestions and ideas.
    The first step, you need to obtain a specific AD user,just like:

    $ ADGroup =“ CN = childusersgroup,DC = childdomain,DC = com”

    $ Members = get-ADGroupMember -Identity $ ADGroup -serverXXXXXdomain.com

    In the second step, you need to export them as CSV,use Export-Csv.
    In the third step, you need to import the CSV file, use import-csv.
    Of course, you need to make specific modifications to them to meet your final needs.
    Please let us know if you would like further assistance.  :)
    Best wishes,
    Young Yang 


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

    Thursday, July 23, 2020 2:27 AM