Forum Discussion

sany98's avatar
sany98
Copper Contributor
May 07, 2021
Solved

Move records from one attribute to another

Hi all,   I need to move the records from employeeNumber field to the employeeID field. I would like to run test on one single user and then on whole OU. Is this doable and how? I'm still learning,...
  • farismalaeb's avatar
    May 08, 2021

    sany98 

    Yes, everything is doable in PowerShell
    You will get ADUser with the employeeNumber and then set it to the employeeID

    $UserName="User1"
    Set-ADUser -id $UserName -Replace @{EmployeeID=(Get-ADUser $UserName -Properties employeenumber).EmployeeNumber}

Resources