Copying Existing AD User to Create New User in Forest

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Richard Siddaway Richard Siddaway 1 month, 3 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #48946
    Profile photo of Jason Colotario
    Jason Colotario


    I have a new AD User that I want to create from an existing User. We have several domains in our forest where his account already exists in one of those domains. I want to create his AD account individually in each domain, but I'm getting an error. Thanks for any help on this!

    Here is my PS Script:

    $userInstance = Get-ADUser -Identity "saraDavis"
    New-ADUser -SAMAccountName "ellenAdams" -Instance $userInstance -DisplayName "EllenAdams"

    Here is the error:

    8648 21C8 ERROR_DS_UPN_VALUE_NOT_UNIQUE_IN_FOREST The operation failed because UPN value provided for addition/modification is not unique forest-wide.


    Yep That'll always happen because the UPN has to be unique in the forest

    What you have to do is define the UPN for the new user so your second line becomes something like

    New-ADUser -samaccountname blah – name 'blah blah' -userprincipalname [email protected]' -instance $userinstance

    you might want to set the password for the new user and enable the account as well


    You don't actually need to recreate the user in each domain in the forest. You can grant rights across any or all domains in the forest – its what Universal groups are for

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.