Skip to main content

spe container set

Updates a SharePoint Embedded container

Usage

m365 spe container set [options]

Options

-i, --id <id>

The Id of the container.

--newName [newName]

New display name for the container.

--description [description]

Description of the container.

--isOcrEnabled [isOcrEnabled]

Indicates whether OCR is enabled for the container. Possible values: true, false.

--isItemVersioningEnabled [isItemVersioningEnabled]

Indicates whether item versioning is enabled. Possible values: true, false.

--itemMajorVersionLimit [itemMajorVersionLimit]

Maximum number of major versions to keep. Requires versioning to be enabled.

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

Permissions

ResourcePermissions
Microsoft GraphFileStorageContainer.Selected

Remarks

In addition to Graph permissions, the app/user must have container-type level permission for the respective container type. The caller must have write access to the container (for example, writer, manager, or owner role) to update metadata/settings.

Examples

Update the container display name by Id.

m365 spe container set --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --newName "Contoso Project A"

Update description only.

m365 spe container set --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --description "Files for the Contoso Project A team"

Disable OCR for a container.

m365 spe container set --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --isOcrEnabled false

Enable versioning and set the major version limit.

m365 spe container set --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --isItemVersioningEnabled true --itemMajorVersionLimit 100

Update name, description, and settings together.

m365 spe container set --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --newName "Contoso Project A - Phase 2" --description "Phase 2 workspace" --isOcrEnabled true --isItemVersioningEnabled true --itemMajorVersionLimit 50

Response

{
"id": "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z",
"displayName": "Contoso Project A",
"description": "Files for the Contoso Project A team",
"containerTypeId": "91710488-5756-407f-9046-fbe5f0b4de73",
"status": "active",
"createdDateTime": "2021-11-24T15:41:52.347Z",
"lockState": "unlocked",
"settings": {
"isOcrEnabled": false,
"itemMajorVersionLimit": 50,
"isItemVersioningEnabled": true
}
}