Skip to main content

spe container add

Creates a new container

Usage

m365 spe container add [options]

Options

-n, --name <name>

The display name of the new container.

-d, --description [description]

The description of the new container.

--containerTypeId [containerTypeId]

The container type ID of the container instance. Use either containerTypeId, or containerTypeName but not both.

--containerTypeName [containerTypeName]

The container type name of the container instance. Use either containerTypeId, or containerTypeName but not both.

--ocrEnabled [ocrEnabled]

Indicates whether Optical Character Recognition (OCR) is enabled for the container. Possible values: true, false. Defaults to false.

--itemMajorVersionLimit [itemMajorVersionLimit]

The maximum major versions allowed for items in the container. Defaults to 500.

--itemVersioningEnabled [itemVersioningEnabled]

Indicates whether versioning is enabled for items in the container. Possible values: true, false. Defaults to true.

-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.

Examples

Creates a new container by specifying the container type ID

m365 spe container add --name Invoices --containerTypeId bba89883-47c2-455b-956b-7a3d8db007fb

Creates a new container by specifying the container type name

m365 spe container add --name Invoices --containerTypeName "Invoice app container type"

Creates a new container with additional options

m365 spe container add --name Invoices --containerTypeId bba89883-47c2-455b-956b-7a3d8db007fb --ocrEnabled true --itemMajorVersionLimit 200 --itemVersioningEnabled true

Response

{
"id": "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z",
"displayName": "Invoices",
"description": "This container is used to store invoices",
"containerTypeId": "bfdd048e-e03f-47d2-bd16-dbbc27281aa3",
"status": "inactive",
"createdDateTime": "2025-04-15T13:31:09.62Z",
"lockState": "unlocked",
"settings": {
"isOcrEnabled": false,
"itemMajorVersionLimit": 500,
"isItemVersioningEnabled": true
}
}