jeste@danishcrown.dk
1 TopicHow to copy one attribute to another
Hi I need to move data from one attribute to another on a user object in Active Dirctory. Today the attribute homePhone is porpulated with users private mobile number. I need to move this to otherMobile. First I try to do this on my own account this way: $homePhone = get-aduser -identity INITIALS -Properties * | Select-Object homePhone Then I want to copy from homePhone to otherMobile this way: set-aduser -identity INITIALS -add @{otherMobile='$homePhone') This sort of works. In my otherMobile is now: {otherMobile='+45XXXXXXXX') How can I only put in the value $homePhone and not the whole string? Of course in the end the script should find all users with the homePhone porpulated and copy the value to otherMobile...Solved23KViews1like4Comments