Table of Contents

Restore-PnPTenantSite

SYNOPSIS

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>] [-Verbose]

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 asking for confirmation to restore the site collection and will wait with the execution of the script until the site collection is restored.

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' from the recycle bin not asking for confirmation to restore the site collection and will wait with the execution of the script until the site collection is restored.

EXAMPLE 3

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

This will restore the site collection with the url 'https://tenant.sharepoint.com/sites/contoso' from the recycle bin not asking for confirmation to restore the site collection and will immediately continue with the execution of the script

PARAMETERS

-Identity

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

Type: String
Parameter Sets: (All)

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Force

Do not ask for confirmation.

Type: SwitchParameter
Parameter Sets: (All)

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

-NoWait

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

Type: SwitchParameter
Parameter Sets: (All)

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

-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
Parameter Sets: (All)

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

-Verbose

When provided, additional debug statements will be shown while executing the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)

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

Microsoft 365 Patterns and Practices