Recover a Site from Recycle Bin in SharePoint Online/Office 365

In my last blog I have described how to permanently delete a site collection in SharePoint online.

Now what, if we want to recover the deleted site? There is one cmdlets Restore-SPODeletedSite available to restore the deleted site collection. Please find the following self-described PowerShell script to restore a deleted site collection from recycle bin in SharePoint online.

Script:

  • Connect to SharePoint Online by using the following PowerShell command. It takes the URL of our tenant admin and a username. Then it will ask for password.
    1. Connect-SPOService -Url https://moharanakirti-admin.sharepoint.com -Credential [email protected]  
  • Restore the Site Collection from recycle bin (If the site does not deleted permanently).
    1. Restore-SPODeletedSite https://moharanakirti.sharepoint.com/sites/kirti  

Restore-SPODeletedSite cmdlets accept a -NoWait parameter which you can provide to tell the cmdlet to return immediately.

Hope this post will help you. Thank you.