Hi,
in our offboarding script we clear the managers name in the organization tab and store this in the extentionAttribute11
so far so good.
in case of reactivating this user we need to retrieve the managers name from extentionAttribute11 and insert it back into the managers field under the organization tab and this gives the following error message
[pre]
Identity info provided in the extended attribute: ‘Manager’ could not be resolved. Reason: 'Cannot find an object with identity: ‘John Doe’
[/pre]
the code I use
[pre]
$user=“myUser”
#$man=(get-aduser $user.manager).DistinguishedName
$manager = Get-ADUser $user -Properties extensionAttribute11
$manager= $manager.extensionAttribute11
Set-ADUser $user -Manager $manager
[/pre]
Paul