Skip to content

Get-TenantCdnOrigins

SharePoint Online: Gets CDN origins

#Requires -Version 5.1
#Requires -Modules Microsoft.Online.SharePoint.PowerShell

[CmdletBinding()]
Param(
    [Parameter(Mandatory = $true)]
    [ValidateSet('Public','Private')]
    [string]$CdnType
)

Process {
    try {
        $result = Get-SPOTenantCdnOrigins -CdnType $CdnType -ErrorAction Stop | Select-Object *
        if ($null -ne $result) { foreach ($item in $result) { $item | Add-Member -NotePropertyName Timestamp -NotePropertyValue (Get-Date -Format "yyyy-MM-dd HH:mm:ss") -PassThru -Force } }
    }
    catch { throw }
}

CDN type: Public or Private

An interactive directory of PowerShell scripts.