Restore all files/items/lists deleted by a single employee

Imagine that your employee wreaked havoc in all the Sharepoint sites he had access to, randomly deleting files, items, lists. Now you, as an admin, need to restore them. Of course you can do it one by one searching through all the recycle bins, but... there is the Powershell :) 

5 Star
1,620 times
Add to favorites
E-mail Twitter Digg Facebook
Sign in to ask a question

  • We need this solution for SharePoint online. Is it possible?
    2 Posts | Last post July 18, 2018
    • Is there a script that can perform the same operation on SharePoint online
    • Hi Ben Dyke,
      Thank you for the idea. I will try to address that. 
      In the meantime you can modify this script to target SharePoint Online environment. 
      Inside the script there are 3 lines that are responsible for authentication to SPO: 
      #$password = ConvertTo-SecureString -string $AdminPassword -AsPlainText -Force
        #$ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
        #$ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $AdminPassword)
      They are currently commented out, but you can use them to switch from on-premise to online.
      You would also need to modify the following lines:
      #Connect-SPOService -Url $adminUrl
      $sites=(Get-SPSite -Limit All).Url