Might try via PowerShell.
https://learn.microsoft.com/en-us/archive/blogs/canitpro/powershell-basics-restoring-a-deleted-powershell-user
--please don't forget to upvote
and Accept as answer
if the reply is helpful--
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
We are having windows Server 2008 R2, Windows Server 2012 R2 & Windows Server 2016 Domain Controllers in our Environment.
Getting following error while restoring the Deleted Active Directory User object from Recycled Bin.
"An attempt was made to modify an object to include an attribute that is not legal for its class".
Could anyone please advise how we can fix it?
Might try via PowerShell.
https://learn.microsoft.com/en-us/archive/blogs/canitpro/powershell-basics-restoring-a-deleted-powershell-user
--please don't forget to upvote
and Accept as answer
if the reply is helpful--