Create Private / Public CDN in SharePoint Online

Here are some command which can help you to create your own CDN :


# Connect to your tenant
Connect-SPOService -Url https://mytenant-admin.sharepoint.com

# Check the current status of CDN capability - by default disabled
Get-SPOTenantCdnEnabled -CdnType Public
Get-SPOTenantCdnEnabled -CdnType Private

# Enable CDN using default settings - -NoDefaultOrigins as optional parameter
Set-SPOTenantCdnEnabled -CdnType Public -NoDefaultOrigins
Set-SPOTenantCdnEnabled -CdnType Private -NoDefaultOrigins

# Get CDN policies
Get-SPOTenantCdnPolicies -CdnType Public
Get-SPOTenantCdnPolicies -CdnType Private

# Add CDN origin
Add-SPOTenantCdnOrigin -CdnType Public -OriginUrl sites/cdn/cdn
Add-SPOTenantCdnOrigin -CdnType Private -OriginUrl sites/pub35/assets

# Get CDN origin
Get-SPOTenantCdnOrigins -CdnType Public
Get-SPOTenantCdnOrigins -CdnType Private

# Public CDN Url, when configured
https://publiccdn.sharepointonline.com/<tenant host name>/sites/sites/library


# Remove CDN origin
Remove-SPOTenantCdnOrigin -CdnType Public -OriginUrl sites/cdn/cdn
Remove-SPOTenantCdnOrigin -CdnType Private -OriginUrl sites/pub35/assets

# Disable CDN using default settings
Set-SPOTenantCdnEnabled -CdnType Public -Enable $false
Set-SPOTenantCdnEnabled -CdnType Private -Enable $false

  • SharePoint Online Management Shell (Download the latest version from here.)
  • Administrator rights

Comments

Popular Posts

SharePoint Interview Questions and Answers

Download Infopath Form Templates

How to get current logged user information using JavaScript ?

Steps to set Form based authentication (FBA) for SharePoint 2010

SharePoint Interview Questions and Answers II

Get List Items - JavaScript

Change Language for current user with JSOM in SharePoint Online

Cross Site List Rollup Web Part for SharePoint 2010

Hide Recently Modified Items

SharePoint 2010 CSS Chart