spe container remove
Removes a container
Usage
m365 spe container remove [options]
Options
-i, --id [id]
The ID of the container instance. Specify either
id
orname
but not both.-n, --name [name]
The name of the container instance. Specify either
id
orname
but not both.--containerTypeId [containerTypeId]
The ID of the container type. Specify either
containerTypeId
orcontainerTypeName
when usingname
but not both.--containerTypeName [containerTypeName]
The name of the container type. Specify either
containerTypeId
orcontainerTypeName
when usingname
but not both.--recycle
Recycle the container instance instead of permanently deleting it.
-f, --force
Do not prompt for confirmation.
-h, --help [help]
Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options
,examples
,remarks
,permissions
,response
,full
. Default isoptions
.--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]
Output type.
json
,text
,csv
,md
,none
. Defaultjson
.--verbose
Runs command with verbose logging.
--debug
Runs command with debug logging.
Remarks
The command is based on an API that is currently in preview and is subject to change once the API reached general availability.
Permissions
- Delegated
- Application
Resource | Permissions |
---|---|
Microsoft Graph | FileStorageContainer.Selected, FileStorageContainerType.Manage.All |
This command only supports application permissions when not using the containerTypeName
option.
Resource | Permissions |
---|---|
Microsoft Graph | FileStorageContainer.Selected |
Examples
Remove a container by ID.
m365 spe container remove --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z"
Move a container specified by ID to the recycle bin.
m365 spe container remove --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --recycle
Remove a container by name specifying the container type id.
m365 spe container remove --name "My Application Storage Container" --containerTypeId d248c449-da7e-4119-b5f6-7bb0865a42f9
Remove a container by name specifying the container type name.
m365 spe container remove --name "My Application Storage Container" --containerTypeName "My Application Container Type"
Response
The command won't return a response on success.