Restoring a deleted OneDrive site
When a user is deleted from an Office 365 tenant, that user's OneDrive site is also deleted (depending on the retention policy set by the tenant admins). This recipe will explain how to recover that deleted OneDrive site.
Using the skills learned in the Setting up the PowerShell environment recipe in Chapter 1, Office 365 Setup and Basic Administration, and the Connecting via PowerShell to SharePoint Online recipe in this chapter, connect to your Office 365 tenant via PowerShell.
The admin restoring the OneDrive site must be assigned the Global admin or SharePoint admin role.
Finally, the admin must have the URL of the deleted OneDrive site. This can be found by checking the Deleted Sites recycle bin with the following code snippet:
Get-SPODeletedSite -IncludeOnlyPersonalSite | FT url
You can verify you have the correct URL with the following code snippet:
Get-SPODeletedSite -Identity "https://natechamberlain...