Skip to content

Enable-CommSite

SharePoint Online: Enables communication site features

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

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

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

URL of the site to enable

An interactive directory of PowerShell scripts.