Skip to content

Extend: spo site add command with Brand center option #6668

@mkm17

Description

@mkm17

Usage

m365 spo site add [options]

Description

Creates a brand center site

Options

Option Description
--type [type] Type of sites to add. Allowed values TeamSite, CommunicationSite, ClassicSite, BrandCenter, default TeamSite

Examples

Create a brand center site.

m365 spo site add --type BrandCenter --url https://contoso.sharepoint.com/sites/brandcenter --title Branding

Default properties

No response

Additional Info

POST https://admin.microsoft.com/_api/SPSiteManager/Create

{"request":{"__metadata":{"type":"Microsoft.SharePoint.Portal.SPSiteCreationRequest"},"Title":"Brand Guide","Url":"https://contoso.sharepoint.com/sites/BrandGuide","WebTemplate":"SITEPAGEPUBLISHING#0","Classification":"","Description":"","SensitivityLabel":"00000000-0000-0000-0000-000000000000","Owner":"","SiteDesignId":"00000000-0000-0000-0000-000000000000","ShareByEmailEnabled":false,"Lcid":1033,"TimeZoneId":13,"**AdditionalSiteFeatureIds**":{"results":["99cd6e8b-189b-4611-ae89-f89105876e43"]}}}

Before executing this command, we need to check if the Brand Center already exists. (As only one brand center can exist).

As suggested by @milanholemans we should also prompt the user for confirmation and notify that the site cannot be deleted.

In the layout there was a checkbox that needed to be accepted (related to the public CDN) before creating the Brand Center, but I can no longer see it. However, it might be a good idea to ask the same question before executing the command.

Image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions