Skip to content

Remove-Theme

SharePoint Online: Removes a theme

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

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

Process {
    try {
        Remove-SPOTheme -Name $Name -ErrorAction Stop
        [PSCustomObject]@{ Timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"; Status = "Success"; Message = "Theme '$Name' removed" }
    }
    catch { throw }
}

Name of the theme to remove

An interactive directory of PowerShell scripts.