Skip to main content

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 or name but not both.

-n, --name [name]

The name of the container instance. Specify either id or name but not both.

--containerTypeId [containerTypeId]

The ID of the container type. Specify either containerTypeId or containerTypeName when using name but not both.

--containerTypeName [containerTypeName]

The name of the container type. Specify either containerTypeId or containerTypeName when using name 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 is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Remarks

warning

The command is based on an API that is currently in preview and is subject to change once the API reached general availability.

Permissions

ResourcePermissions
Microsoft GraphFileStorageContainer.Selected, FileStorageContainerType.Manage.All

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.