cli-microsoft365 icon indicating copy to clipboard operation
cli-microsoft365 copied to clipboard

New command: m365 spe container remove

Open Adam-it opened this issue 1 year ago • 1 comments

Usage

m365 spe container remove [options]

Description

Removes a container

Options

Option Description
-i, --id <id> Container id
--recycle Recycle a container instead of actually deleting it.

Examples

Permanently deletes a container

m365 spe container remove --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z"

Recycles a container

m365 spe container remove --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --recycle 

Default properties

No response

Additional Info

we may use the following DELETE request to move a container to recycle bin

/storage/fileStorage/containers/{containerId}

https://learn.microsoft.com/en-us/graph/api/filestorage-delete-containers?view=graph-rest-1.0&tabs=http

to permanently delete it we may use

beta/storageContainers/{containerId}/permanentDelete

what's worth noticing is that permanent delete as of now is only available on beta MS Graph endpoint

https://learn.microsoft.com/en-us/graph/api/filestoragecontainer-permanentdelete?view=graph-rest-betathe

Adam-it avatar Jun 09 '24 21:06 Adam-it