Wednesday, December 20, 2017

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

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

JavaScript Related Questions & Answers

1.What is JavaScript? JavaScript is a client-side as well as server side scripting language that can be inserted into HTML pages an...