showinaddressbook attbute is preventing me copying users in ad

When trying to copy A users in AD I get error.  
WIndows cannot create the object username because: The name reference is invalid.

If I clear the contents for showinAddressBook attribute it will let me copy that user. The data in the field contains data like this: CN=All Users\0ADEL:c11e6e9b-54d4-44de-90a0-a57430c21f18,CN=Deleted Objects,CN=Configuration,DC=Domain,DC=local

Note: We don't have an onsite Exchange server but There was one in the past.  I think it is related to that somehow but not sure how to fix it for all users.    

Servers are windows 2012 Functional level is  2008.

Thanks in advance
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Will SzymkowskiSenior Solution ArchitectCommented:
It appears that how you Removed Exchange from your Active Directory Environment was not the correct method and there is still remnats of the old Exchange servers/attributes.

At this point you are better off using the ADSIEdit method to remove the old Exchange attributes.

Below is a great tutorial for removing Exchange using ADSIEdit.

Once you have removed the Exchange Configuration from AD you should not have this issue anymore.

jyoung127Author Commented:
The only thing that is in CN= Microsoft Exchange is a sub folder CN=Active Directory Connections but nothing in that folder or any other folders.
I've come across this in reading (others have solved it the same way), and just checked my own environment which was migrated from Exchange 2003 to Office 365.  Even though all Exchange objects have been removed properly, it doesn't clear out various attributes on accounts.

You can use the following to clear the showInAddressBook attribute for all users using PowerShell.
Import-Module ActiveDirectory
Get-ADUser -filter * | Set-ADUser -Clear showInAddressBook

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jyoung127Author Commented:
Perfect that is what I was looking for! Thanks alot
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Active Directory

From novice to tech pro — start learning today.