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

Comments? Questions?Have a look at my GitHub SharePointOnline-ScriptSamples, where you can find this SharePoint script and many others!You can find all my repositories at PowershellScripts @ GitHubImagine that your employee wreaked havoc in all the Sharepoint sites he had access

5 Star
1,948 times
Add to favorites
E-mail Twitter Digg Facebook
  • 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