PowerShell as an Active Directory group restoration tool

This article explains the steps involved in restoring a deleted AD group using PowerShell versus using RecoveryManager Plus, our AD backup and recovery tool. This article also explains how the GUI-based RecoveryManager Plus makes it easy for any administrator to restore any deleted group in a few simple clicks without having to write even a single line of PowerShell script.

Windows PowerShell

Steps to restore deleted groups using PowerShell:

  • Note: You have to enable the AD Recycle Bin before you can restore deleted objects using PowerShell. Once enabled, the Recycle Bin cannot be disabled.
  • Step 1: Identify the distinguished name of the group to be restored by executing the following PowerShell script:
  • Sample script:

    (Get-ADObject -SearchBase (get-addomain).deletedobjectscontainer -IncludeDeletedObjects -filter "samaccountname -eq '%OLD_NAME%' ")
    Click to copy the script
  • Step 2: Execute the following script to restore the deleted user object:
  • Sample script:

    Click to copy the script
    • Restore-ADObject -Identity $dn
    Click to copy the script

RecoveryManager Plus

Steps to restore deleted user objects using RecoveryManager Plus:

  • Step 1: Navigate to Active Directory > Recycle Bin.
  • Step 2: Select the group you wish to restore and click Restore.

Screenshot

PowerShell as an Active Directory group restoration tool

That’s all it takes. There's no PowerShell scripting. Enjoy easy, GUI-based, point-and-click restoration for groups, with advanced options such as advanced search and automatic membership restoration.

» Start your 30-day, free trial now.

Limitations of using PowerShell to restore deleted AD groups

  • The built-in AD Recycle Bin has to be enabled for AD group restoration via PowerShell to be possible.
  • It is not possible to preview the properties of a group before restoring it.
  • Multiple groups cannot be restored simultaneously.
  • If the deleted group was present in an OU that has also been deleted, the OU has to be restored first before the group can be restored.

Overcome the limitations of PowerShell by using
RecoveryManager Plus to restore deleted objects.

  •  
     
  •  
  • By clicking 'Download now', you agree to processing of personal data according to the Privacy Policy.

Thank you for downloading!

Your download should begin automatically in 15 seconds. If not, click here to download manually.

  • Embark on your script-free AD Self-service password management with ADSelfService Plus.
  •  
  • By clicking 'Get your free trial now', you agree to processing of personal data according to the Privacy Policy.
  • Thank you for downloading!

    Your download should begin automatically in 15 seconds. If not, click here to download manually.

Related Resources

A single pane of glass for Active Directory, Azure Active Directory,
Microsoft 365, Google Workspace, and Exchange Backup.
  • » Personal WorkDrive backup
  • » Backup retention
  • » Incremental backup