This is probably a noobie question as I'm still new to managing SharePoint Online using PowerShell.

I was looking at a post from here to enable CDN on the picture library for slideshows. The issue i'm facing is that it is still using the Get-SPO verbiage.

Get-SPOTenantCdnEnabled -CdnType Private

Set-SPOTenantCdnEnabled -CdnType Private -Enable $true 
Set-SPOTenantCdnEnabled -CdnType Private 
Add-SPOTenantCdnOrigin -CdnType Private -OriginUrl */libname

I can't find any Get/Set-Pnp cdn cmdlets. Any help, link, or references is greatly appreciated!


There is not an API to achieve this feature in pnp-powershell currently. Check the article below:


We need use the PowerShell below to achieve it in currently.

$spo = Read-Host 'Enter your SPO Service URL. (example https://<tenant>-admin.sharepoint.com)'
$origin = Read-Host 'Enter the url to the CDN.  (example https://<tenant>.sharepoint.com/sites/Media/CDNLibrary)'
connect-sposervice $spo
$tenant = Get-SPOTenant
Set-SPOTenant -PublicCdnEnabled $true
$tenant = Get-SPOTenant
New-SPOPublicCdnOrigin -url $origin

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.