Skip to content

spo cdn set

Enable or disable the specified Office 365 CDN

Usage

spo cdn set [options]

Options

Option Description
--help output usage information
-e, --enabled <enabled> Set to true to enable CDN or to false to disable it. Valid values are true
-t, --type [type] Type of CDN to manage. Public|Private|Both. Default Public
--noDefaultOrigins pass to not create the default Origins
-o, --output [output] Output type. json|text. Default text
--verbose Runs command with verbose logging
--debug Runs command with debug logging

Important

To use this command you have to have permissions to access the tenant admin site.

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.

Examples

Enable the Office 365 Public CDN on the current tenant

spo cdn set -t Public -e true

Disable the Office 365 Public CDN on the current tenant

spo cdn set -t Public -e false

Enable the Office 365 Private CDN on the current tenant

spo cdn set -t Private -e true

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

spo cdn set -t Both -e true

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

spo cdn set -t Both -e true --noDefaultOrigins

More information