Hi,
Thank you for posting in our forum.
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 ‘blah@blah’ -instance $userinstance
you might want to set the password for the new user and enable the account as well.
reference:https://docs.microsoft.com/zh-cn/windows-server/identity/ad-ds/manage/component-updates/spn-and-upn-uniqueness?redirectedfrom=MSDN
https://powershell.org/forums/topic/copying-ad-user-to-create-new-user-in-forrest/
Hope this information can help you
Best wishes
Vicky
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact
tnmff@microsoft.com.