Skip to content

Set-OrgNewsSite

SharePoint Online: Sets org news site

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

[CmdletBinding()]
Param(
    [Parameter(Mandatory = $true)]
    [string]$SiteUrl
)

Process {
    try {
        Set-SPOOrgNewsSite -OrgNewsSiteUrl $SiteUrl -ErrorAction Stop
        [PSCustomObject]@{ Timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"; Status = "Success"; Message = "Org news site set to '$SiteUrl'" }
    }
    catch { throw }
}

URL of the site to set as org news site

An interactive directory of PowerShell scripts.