import Global from '../../_global.mdx'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
Creates new SharePoint Online site
m365 spo site add [options]`--type [type]`
: Type of sites to add. Allowed values `TeamSite`, `CommunicationSite`, `ClassicSite`, `BrandCenter`, default `TeamSite`
`-t, --title <title>`
: Site title
`-a, --alias [alias]`
: Site alias, used in the URL and in the team site group e-mail (applies to type TeamSite)
`-u, --url [url]`
: Site URL (applies to type CommunicationSite, ClassicSite, BrandCenter)
`-z, --timeZone [timeZone]`
: Integer representing time zone to use for the site (applies to type ClassicSite)
`-d, --description [description]`
: Site description
`-l, --lcid [lcid]`
: Site language in the LCID format, eg. _1033_ for _en-US_. See [SharePoint documentation](https://support.microsoft.com/en-us/office/languages-supported-by-sharepoint-dfbf3652-2902-4809-be21-9080b6512fff) for the list of supported languages
`--owners [owners]`
: Comma-separated list of users to set as site owners (applies to type TeamSite, ClassicSite)
`--isPublic`
: Determines if the associated group is public or not (applies to type TeamSite)
`-c, --classification [classification]`
: Site classification (applies to type TeamSite, CommunicationSite, BrandCenter)
`--siteDesign [siteDesign]`
: Type of communication site to create. Allowed values `Topic`, `Showcase`, `Blank`, default `Topic`. When creating a communication site, specify either `siteDesign` or `siteDesignId` (applies to type CommunicationSite)
`--siteDesignId [siteDesignId]`
: Id of the custom site design to use to create the site. When creating a communication site, specify either `siteDesign` or `siteDesignId` (applies to type CommunicationSite)
`--shareByEmailEnabled`
: Determines whether it's allowed to share file with guests (applies to type CommunicationSite, BrandCenter)
`-w, --webTemplate [webTemplate]`
: Template to use for creating the site. Default `STS#0` (applies to type ClassicSite)
`--resourceQuota [resourceQuota]`
: The quota for this site collection in Sandboxed Solutions units. Default `0` (applies to type ClassicSite)
`--resourceQuotaWarningLevel [resourceQuotaWarningLevel]`
: The warning level for the resource quota. Default `0` (applies to type ClassicSite)
`--storageQuota [storageQuota]`
: The storage quota for this site collection in megabytes. Default `100` (applies to type ClassicSite)
`--storageQuotaWarningLevel [storageQuotaWarningLevel]`
: The warning level for the storage quota in megabytes. Default `100` (applies to type ClassicSite)
`--removeDeletedSite`
: Set, to remove existing deleted site with the same URL from the Recycle Bin (applies to type ClassicSite)
`--withAppCatalog`
: Set, to create a site collection app catalog on the newly created site.
`--wait`
: Wait for the site to be provisioned before completing the command (applies to type ClassicSite)
`-f, --force`
: Don't prompt for confirmation to create BrandCenterUsing the -z, --timeZone option you have to specify the time zone of the site. For more information about the valid values see https://msdn.microsoft.com/library/microsoft.sharepoint.spregionalsettings.timezones.aspx.
The value of the --resourceQuota option must not exceed the company's aggregate available Sandboxed Solutions quota. For more information, see Resource Usage Limits on Sandboxed Solutions in SharePoint 2010: http://msdn.microsoft.com/en-us/library/gg615462.aspx.
The value of the --resourceQuotaWarningLevel option must not exceed the value of the --resourceQuota option.
The value of the --storageQuota option must not exceed the company's available quota.
The value of the --storageQuotaWarningLevel option must not exceed the the value of the --storageQuota option.
If you try to create a site with the same URL as a site that has been previously moved to the recycle bin, you will get an error. To avoid this error, you can use the --removeDeletedSite option. Prior to creating the site, the spo site add command will check if the site with the specified URL has been previously moved to the recycle bin and if so, will remove it. Because removing sites from the recycle bin might take a moment, it should be used in conjunction with the --wait option so that the new site is not created before the old site is fully removed.
Deleting and creating classic site collections is by default asynchronous and depending on the current state of Office 365, might take up to few minutes. If you're building a script with steps that require the site to be fully provisioned, you should use the --wait flag. When using this flag, the spo site add command will keep running until it received confirmation from Office 365 that the site has been fully provisioned.
The --owners option is mandatory for creating CommunicationSite or BrandCenter` sites with app-only permissions.
When trying to create a team site using app-only permissions, you will get an Insufficient privileges to complete the operation. error. As a workaround, you can use the entra m365group add command, followed by spo site set to further configure the Team site.
Create modern team site with private group
m365 spo site add --alias team1 --title "Team 1"Create modern team site with description and classification
m365 spo site add --type TeamSite --alias team1 --title "Team 1" --description "Site of team 1" --classification LBICreate modern team site with public group
m365 spo site add --type TeamSite --alias team1 --title "Team 1" --isPublicCreate modern team site using the Dutch language
m365 spo site add --alias team1 --title "Team 1" --lcid 1043Create modern team site with the specified users as owners
m365 spo site add --alias team1 --title "Team 1" --owners "[email protected], [email protected]"Create a modern team site and enable the site collection app catalog
m365 spo site add --alias team1 --title "Team 1" --withAppCatalogCreate communication site using the Topic design
m365 spo site add --type CommunicationSite --url https://contoso.sharepoint.com/sites/marketing --title MarketingCreate communication site using app-only permissions
m365 spo site add --type CommunicationSite --url https://contoso.sharepoint.com/sites/marketing --title Marketing --owners "[email protected]"Create communication site using the Showcase design
m365 spo site add --type CommunicationSite --url https://contoso.sharepoint.com/sites/marketing --title Marketing --siteDesign ShowcaseCreate communication site using a custom site design
m365 spo site add --type CommunicationSite --url https://contoso.sharepoint.com/sites/marketing --title Marketing --siteDesignId 99f410fe-dd79-4b9d-8531-f2270c9c621cCreate communication site using the Blank design with description and classification
m365 spo site add --type CommunicationSite --url https://contoso.sharepoint.com/sites/marketing --title Marketing --description Site of the marketing department --classification MBI --siteDesign BlankCreate a communication site and enable the site collection app catalog
m365 spo site add --type CommunicationSite --url https://contoso.sharepoint.com/sites/marketing --title Marketing --withAppCatalogCreate a new classic site collection using the Team site template. Set time zone to UTC+01:00. Don't wait for the site provisioning to complete
m365 spo site add --type ClassicSite --url https://contoso.sharepoint.com/sites/team --title Team --owners [email protected] --timeZone 4Create a new classic site collection using the Team site template. Set time zone to UTC+01:00. Wait for the site provisioning to complete
m365 spo site add --type ClassicSite --url https://contoso.sharepoint.com/sites/team --title Team --owners [email protected] --timeZone 4 --webTemplate STS#0 --waitCreate a new classic site collection using the Team site template. Set time zone to UTC+01:00. If a site with the same URL is in the recycle bin, delete it. Wait for the site provisioning to complete
m365 spo site add --type ClassicSite --url https://contoso.sharepoint.com/sites/team --title Team --owners [email protected] --timeZone 4 --webTemplate STS#0 --removeDeletedSite --waitCreate a new classic site and enable the site collection app catalog
m365 spo site add --type ClassicSite --url https://contoso.sharepoint.com/sites/team --title Team --owners [email protected] --timeZone 4 --webTemplate STS#0 --withAppCatalogCreate a brand center site
m365 spo site add --type BrandCenter --url https://contoso.sharepoint.com/sites/brandcenter --title Branding"https://contoso.sharepoint.com/sites/marketing"https://contoso.sharepoint.com/sites/marketing
https://contoso.sharepoint.com/sites/marketinghttps://contoso.sharepoint.com/sites/marketing- Creating SharePoint Communication Site using REST: https://learn.microsoft.com/sharepoint/dev/apis/communication-site-creation-rest