Forum Discussion
michaels_IT
Oct 05, 2020Copper Contributor
Changing UPN with Powershell
I need to change the UPN on about 200 accounts in our company. I have a CSV file with the old and new UPNs in question. The script I am trying to use is here: https://gallery.technet.microsoft.co...
- Oct 05, 2020
Hi michaels_IT
Replicated this issue in my lab. Fixed by changing
Set-ADUser -Identity $UserDetails.Name
To this:
Set-ADUser -Identity $UserDetails.SamAccountName
Keep everything else the same. UPN's now changed correctly.
Hope this helps,
HidMov
Oct 05, 2020Steel Contributor
Hi michaels_IT
Replicated this issue in my lab. Fixed by changing
Set-ADUser -Identity $UserDetails.Name
To this:
Set-ADUser -Identity $UserDetails.SamAccountName
Keep everything else the same. UPN's now changed correctly.
Hope this helps,
- michaels_ITOct 07, 2020Copper Contributor
That worked perfectly. Thanks for the help. HidMov