Purge the Active Directory Recycling Bin using PowerShell

One of the coolest Active Directory features is the recycle bin which gives you the ability to recover deleted Active Directory objects. Your forest functional level must be at least 2008 R2. When you delete an object, you can restore it through the Active Directory Administrative Center.

Sometimes, you may want to permanently delete one item in this recycling bin. There is no way to perform this task using the GUI, so you must use Windows PowerShell.

First, check if the deleted object is still in the recycle bin:

Depending the output, you can permanently remove the object using the following:

You can add -Confirm:$false if you don’t want to confirm the deletion.

Thanks for reading! You can follow me on Twitter @PrigentNico

About Nicolas 244 Articles
I work as a System Engineer, based in Switzerland with a primary focus on Microsoft technologies. I have 7 years experience in administering Windows Servers. . I am a Microsoft MVP for Cloud & Datacenter Management. I also received the PowerShell Hero 2016 award by PowerShell.0rg. And finally, I am "MCSE: Cloud Platform and Infrastructure", "MCSA: Windows Servers" and "Administering & Deploying SCCM" certified.