For replacing User attributes with values of other attributes of that same User, I discovered the following script online:
get-aduser User1 -pr supvid, manager | %{set-aduser -identity $_.samaccountname -Replace @{SupvID=$(get-aduser ($_.manager) | %{$_.samaccountname})}
I have 2 questions about the script:
1. What does the "$" mean when used outside the parenthesis - "$(get-aduser...)"
2. Is this the best way to replace attributes with the values of other attributes for an object?