Skip to content

Solution Automation RestoreRecycleBinAuto

Barbarur edited this page Feb 3, 2024 · 3 revisions

Restore items from the recycle bin

Solution Code: RestoreRecycleBinAuto

Requirements

Run the solution with and account with access to SharePoint Admin Center.

Parameters

Actions when conflict
Parameter Type Description
Do nothing Required
Choice
The File/Folder will be left on the recycle bin.
Rename original Required
Choice
The File/Folder on the original location will be renamed and try to restore again the file/folder from the recycle bin.

How this Solution works

  1. Collects the required Sites.
  2. Add account as Site Collection Admin.
  3. Collects the items from the selected recycle bin stage.
  4. Try to restore items from recycle bin.
  5. If File or Folder with same name exists on the original location:
    1. File/Folder on the original location can be renamed and try to restore file/folder from the recycle bin.
    2. Leave the file/folder in the recycle bin.
  6. Records the information for each action in a CSV file.

The rename action is only supported for Files and Folders. Meanwhile List Items have no issue on having the same name, so restoration won't have such naming conflicts. Other objects such as List, Libraries and Subsites are not supported at the moment.

Clone this wiki locally