Sharepoint – Restoring A Site Collection

Microsoft has the GUI which you can administer the Sharepoint site, however there are times which certain functionality cannot be performed. Example like the “deleted site collections”. A request came in to restore the site. Upon logging onto the portal ( Sharepoint Admin Site ), under the recycle bin, the sites were not showing even though they were deleted. Then with the new Sharepoint Admin site in progress, when you click to view it, you can see the deleted sites. When you select them, there is no restore option?

To confirm if you the required permissions, I logged onto the Sharepoint tenant via Powershell. You will need to have the Sharepoint Powershell Module. Here is link to download the application:

Sharepoint Online Management Shell

Choose the version 86x or 64x. Once the installation is completed, then connect to the tenant using the following script:

 

$adminUPN=”<the full email address of a SharePoint administrator account, example: user@domain.com or user@company.onmicrosoft.com>”

$orgName=”<name of your Office 365 organization, example: company>”

$userCredential = Get-Credential -UserName $adminUPN -Message “Type the password.”

Connect-SPOService -Url https://domain-admin.sharepoint.com -Credential $userCredential

You can test to confirm if you have connected successfully but running a Get-SPOSite and results should show.

Then run Get-SPODeletedsite. This will display the Deleted sites.

It is a simple command to restore the site:

Restore-SPODeletedsite -Identity

If it moves to the next line with a new cursor, then it means the restore completed successfully.

The important aspect is that when you run the Get-SPOdeletedsite, there is a time limit on the deleted sites before it is purged completely.

Complete the rest of the restores as required. You can run the Get-SPODeletedsite to get the URL / Identity:

Running the Powershell commands and restoring the sites shows that you have the right permissions ( Global Admin ). However, with the evolution of Office 365 portals, we will have to wait for the next change.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.