Skip to main content

spo cdn set

Enable or disable the specified Microsoft 365 CDN

Usage

m365 spo cdn set [options]

Options

-e, --enabled <enabled>

Set to true to enable CDN or to false to disable it. Allowed values: true, false.

-t, --type [type]

Type of CDN to update. Allowed values: Public, Private, Both. Defaults to Public.

--noDefaultOrigins

Specify this flag to not create the default origins.

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, 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

Using the -t, --type option you can choose whether you want to manage the settings of the Public (default), Private CDN or both. If you don't use the option, the command will use the Public CDN.

Using the -e, --enabled option you can specify whether the given CDN type should be enabled or disabled. Use true to enable the specified CDN and false to disable it.

Using the --noDefaultOrigins option you can specify to skip the creation of the default origins.

info

To use this command you must be a Global or SharePoint administrator.

Examples

Enable the Microsoft 365 Public CDN on the current tenant

m365 spo cdn set --type Public --enabled true

Disable the Microsoft 365 Public CDN on the current tenant

m365 spo cdn set --type Public --enabled false

Enable the Microsoft 365 Private CDN on the current tenant

m365 spo cdn set --type Private --enabled true

Enable the Microsoft 365 Private and Public CDN on the current tenant with default origins

m365 spo cdn set --type Both --enabled true

Enable the Microsoft 365 Private and Public CDN on the current tenant without default origins

m365 spo cdn set --type Both --enabled true --noDefaultOrigins

Response

The command won't return a response on success.

More information

CTRL + M