Restore-PnPTenantSite

Tip

We encourage you to make improvements to this documentation. Please navigate to https://github.com/pnp/powershell/blob/dev/documentation/Restore-PnPTenantDeletedSite.md to change this file.

Required Permissions

  • SharePoint: Access to the SharePoint Tenant Administration site

Restores a site collection from the Tenant recycle bin.

Syntax

Restore-PnPTenantSite
       [-Identity] <String>
       [-Force]
       [-NoWait]
       [-Connection <PnPConnection>]
       [<CommonParameters>]

Description

Restores a site collection which is listed in your tenant administration site from the tenant's recycle bin.

Examples

EXAMPLE 1

Restore-PnPTenantSite -Identity "https://tenant.sharepoint.com/sites/contoso"

This will restore the site collection with the url 'https://tenant.sharepoint.com/sites/contoso' from the recycle bin.

EXAMPLE 2

Restore-PnPTenantSite -Identity "https://tenant.sharepoint.com/sites/contoso" -Force

This will restore the site collection with the url 'https://tenant.sharepoint.com/sites/contoso' with force from the recycle bin.

Parameters

-Connection

Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type:PnPConnection
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force

Do not ask for confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Identity

Specifies the full URL of the site collection that needs to be restored.

Type:String
Position:0
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-NoWait

If specified the task will return immediately after creating the restore site job.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False