Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Remove-SPOSite

Remove-SPOSite

microsoft.online.sharepoint.powershell-1.dll, microsoft.online.sharepoint.powershell.dll

Synopsis

Sends a SharePoint Online site collection to the SharePoint Online Recycle Bin.

Syntax

Remove-SPOSite [-Identity] [-Confirm] [-NoWait] [-WhatIf] [<CommonParameters>]

Detailed Description

The Remove-SPOSite cmdlet does not delete a site collection from the site collections list permanently. Instead, the removed site collection is moved to the Recycle Bin. You can use the Restore-SPODeletedSitecmdlet to restore a site collection from the Recycle Bin. To delete a site collection permanently, first move the site collection to the Recycle Bin by using the Remove-SPOSite cmdlet, and then delete it from the Recycle Bin by using the Remove-SPODeletedSite cmdlet.

You must be a SharePoint Online global administrator and a site collection administrator to run the cmdlet.

For permissions and the most current information about Windows PowerShell for SharePoint Online, see the online documentation at http://go.microsoft.com/fwlink/p/?LinkId=251832 (http://go.microsoft.com/fwlink/p/?LinkId=251832).

Parameters

-Identity <SpoSitePipeBind>

Specifies the URL of the site collection to remove.

Aliases

None

Required?

True

Position

1

Default value

Accept pipeline input?

True

Accept wildcard characters?

False

-Confirm <SwitchParameter>

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters.

Aliases

None

Required?

False

Position

Named

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

-NoWait <SwitchParameter>

Specifies to continue executing script immediately.

Aliases

None

Required?

False

Position

Named

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

-WhatIf <SwitchParameter>

Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters.

Aliases

None

Required?

False

Position

Named

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

Input Type

Return Type

Notes

None

Examples

--------EXAMPLE--------

This example immediately removes the site collection named https://contoso.sharepoint.com/sites/site1 from the site collections list and moves it to the Recycle Bin.

C:\PS>Remove-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -NoWait

Introduction to the SharePoint Online management shell
Set up the SharePoint Online Management Shell Windows PowerShell environment
Remove-SPODeletedSite
Restore-SPODeletedSite