Remove-SPOContainer
Sends a Container to the Recycle Bin.
Syntax
Default (Default)
Remove-SPOContainer
[-Identity] <SPOContainerPipeBind>
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Remove-SPOContainer
cmdlet deletes a File Storage Container and puts it in the Recycle Bin. A Container that is deleted will no longer be retrieved by the Get-SPOContainer
cmdlet.
When admins delete a Container, it is moved into the Recycle Bin. A deleted Container can be restored from the Recycle Bin within 93 days. If a Container is deleted from the Recycle Bin, or it exceeds the 93-day retention period, it is permanently deleted. Deleting a Container deletes everything within it, including all documents and files. You can view all deleted Containers in the Recycle Bin with the Get-SPODeletedContainer
cmdlet.
You must be at least a SharePoint Online administrator to run the cmdlet.
Examples
Example 1
Remove-SPOContainer -Identity 423poi45-jikl-9bnm-b302-1234ghy56789
Example 1 places the Container with the ContainerId
423poi45-jikl-9bnm-b302-1234ghy56789
into the Recycle Bin. The Container will be permanently deleted from the Recycle Bin after 93 days unless the deleted Container is restored before permanent deletion.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: | System.Management.Automation.SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | cf |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Force
Applicable: SharePoint Online
Whether to remove the container without prompting for confirmation.
Parameter properties
Type: | System.Management.Automation.SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Identity
Applicable: SharePoint Online
Use this parameter to provide the ContainerId
of the Container to be deleted.
Parameter properties
Type: | Microsoft.Online.SharePoint.PowerShell.SPOContainerPipeBind |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 0 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: | System.Management.Automation.SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | wi |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.