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.
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:
- Step 2: Execute the following script to restore the deleted user object:
- Restore-ADObject -Identity $dn
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.
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.
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.