Remove-PnPTenantSite

Removes a site collection

Syntax

Remove-PnPTenantSite
      -Url <String>
                          [-SkipRecycleBin [<SwitchParameter>]]
                          [-Force [<SwitchParameter>]]
                          [-Connection <SPOnlineConnection>]

Description

Removes a site collection which is listed in your tenant administration site.

Examples

------------------EXAMPLE 1------------------

Remove-PnPTenantSite -Url https://tenant.sharepoint.com/sites/contoso

This will remove the site collection with the url 'https://tenant.sharepoint.com/sites/contoso' and put it in the recycle bin.

------------------EXAMPLE 2------------------

Remove-PnPTenantSite -Url https://tenant.sharepoint.com/sites/contoso -Force -SkipRecycleBin

This will remove the site collection with the url 'https://tenant.sharepoint.com/sites/contoso' with force and it will skip the recycle bin.

------------------EXAMPLE 3------------------

Remove-PnPTenantSite -Url https://tenant.sharepoint.com/sites/contoso -FromRecycleBin

This will remove the site collection with the url 'https://tenant.sharepoint.com/sites/contoso' 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:SPOnlineConnection
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Force

Do not ask for confirmation.

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-SkipRecycleBin

Do not add to the tenant scoped recycle bin when selected.

Type:SwitchParameter
Aliases:SkipTrash
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Url

Specifies the full URL of the site collection that needs to be deleted

Type:String
Position:0
Accept pipeline input:True
Accept wildcard characters:False