I am having an issue copying the user object guid from one account and pasting it onto an ARS extended attribute on another account. The user object guid attribute has a syntax of OctelString and the new schema attribute I created also has a Syntax Type of OctelString. Yet no matter if I copy the field directly or convert it to a string first and then copy I end with a number that is not the object guid. In my script below I am copying two attributes, the first one is an employee ID which is a normal string and that copies without issue, the one I am having a problem with is the object guid.
Ex:
Value that I am copying = 21db2ced-aab1-4969-bf18-e8e36666e0e6
Value that appears in copied attribute = 4544324344423231423141413639343942463138453845333636363645304536
My Script:
$Users = Import-Csv -Path C:\Temp\Quest\Link_User_Account\Acct_Synch_Test.csv
foreach($user in $Users)
{
#These are the variables I am creating to hold the samaccountname of the source account and the account I am copying the variable to.
$Master_User = $user.primarysam
$Secondary_User = $user.secondsam
$myuser = Get-QADUser -SearchRoot "DC=mydomain,DC=com" -Identity $Master_User -IncludedProperties employeeID, Objectguid | `
Select-Object employeeID, Objectguid
Set-QADUser -Identity $Secondary_User -objectAttributes @{edsvaemployeeid = $myuser.employeeID; edsvaLinkAccountGuidMaster = $myuser.Objectguid}
}