Add-SPOTenantCdnOrigin

 

Applies to: SharePoint Online

Topic Last Modified: 2017-01-31

Configures a new origin to public or private content delivery network (CDN).

Add-SPOTenantCdnOrigin -CdnType <Public | Private> -OriginUrl <String> [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]

--------EXAMPLE 1--------

Add-SPOTenantCdnOrigin -CdnType public -OriginUrl */subfolder

This example configures a public CDN on a tenant level.

--------EXAMPLE 2--------

Add-SPOTenantCdnOrigin -CdnType public -OriginUrl */subfolder

This example configures a public CDN on a site level.

Configures a new origin to public or private CDN, on either Tenant level or on a single Site level. Effectively, a tenant admin points out to a document library, or a folder in the document library, and requests that content in that library should be retrievable by using a CDN.

You must be a SharePoint Online global administrator and a site collection administrator to run the cmdlet.

 

Parameter Required Type Description

CdnType

Required

Microsoft.Online.SharePoint.TenantAdministration.SPOTenantCdnType

Specifies the CDN type. The valid values are: public or private.

OriginUrl

Required

System.String

Specifies a path to the doc library to be configured. It can be provided in two ways: relative path, or a mask.

  • Relative-Relative path depends on the OriginScope. If the originScope is Tenant, a path must be a relative path under the tenant root. If the originScope is Site, a path must be a relative path under the given Site. The path must point to the valid Document Library or a folder with a document library.

    Any asset stored under the path provided (in the container itself or any of its subfolders) will be exposed via CDN

  • Mask - Mask allows to configure a partial URL match. It must start with */, and must not include * anywhere else. I.e. an origin “*/masterpages” will expose all the assets under all the masterpages libraries, either under the tenant root (means, anywhere in the tenancy) or in the given site collection, depends on the OriginScope parameter. Equally, */masterpages/subfolder will enable items in “subfolder” and below.

Confirm

Optional

System.Management.Automation.SwitchParameter

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

WhatIf

Optional

System.Management.Automation.SwitchParameter

Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters

Show: