A few years ago, Microsoft introduced the Active Directory Recycle Bin to Windows Server. Wonderful! It is not enabled out of the box, but it is reasonably simple to enable… except, it is not.
Firstly, you can do it in the GUI… Open the Active Directory Administrative Center, navigate to local (local), and then in the Actions Pane click Enable Recycle Bin… You will get a warning about how serious this is – that is, it is irreversible. Thanks, let’s go ahead. We’re done.
The other way to do it, and obviously my preferred method, is with PowerShell. Use the following cmdlet:
Enable-ADOptionalFeature –Identity ‘CN=Recycle Bin Feature,CN=Optional Features,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=local,DC=domain,DC=name’ –Scope ForestOrConfigurationSet –Target ‘local.domain.name’
Once again, you will get a warning that “Enabling ‘Recycle Bin Feature” is an irreversible action! You will not be able to disable ‘Recycle Bin Feature’ on ‘CN=Partitions,CN=Configuration,DC=local,DC=domain,DC=name’ if you proceed.”
(Yes, the warning is in orange… not my choice)
You press YES, you go ahead, and it’s done…
…or IS IT?
“A referral was returned from the server”
This error can come equally and identically from the GUI as from PowerShell… It simply means, THIS DID NOT WORK.
I have read all sorts of articles and forums on this, people telling people that they had the syntax wrong. “Change single quotes to double quotes, or remove the quotes, that’s what will work.” Some of these may be accurate. In my experience, it is not a syntax error.
There are five (5) Flexible Single Master Operations (FSMO) roles on our domain. Two of these, namely the Schema Master and the Domain Naming Master have to be on the same domain controller in order for this to work. Otherwise… no.
I should also take a moment to mention that anytime you are doing anything with the Schema Master role, you have to be a member of the Schema Administrators security group. I hear from people all the time ‘…but I am a member of the Enterprise Admins group!’ Nothing doing… except that, if you are a member of the EA group, you can add yourself pretty easily to the SA group.
So… transfer the Schema master role and you will be fine. Good luck!
Oh yeah… here’s how.
- Use ntdsutil.exe. I will not bore you with the details… somewhere under roll – connections – servers – bla bla bla.
- Use PowerShell. Here’s your cmdlet:
Move-ADDirectoryServerOperationMasterRole -Identity “Target-DC” -OperationMasterRole SchemaMaster
Let me know if you run into any further issues, but this should solve it for you!