Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

New-SPOSite

New-SPOSite

microsoft.online.sharepoint.powershell-1.dll, microsoft.online.sharepoint.powershell.dll

Synopsis

Creates a new SharePoint Online site collection for the current company.

Syntax

New-SPOSite [-Url] [-Owner] [-StorageQuota] [-CompatibilityLevel] [-LocaleId] [-NoWait] [-ResourceQuota] [-Template] [-TimeZoneId] [-Title] [<CommonParameters>]

Detailed Description

The New-SPOSite cmdlet creates a new site collection for the current company. However, creating a new SharePoint Online site collection fails if a deleted site with the same URL exists in the Recycle Bin.

You must be a SharePoint Online global administrator to run the cmdlet.

For permissions and the most current information about Windows PowerShell for SharePoint Online, see the online documentation at http://go.microsoft.com/fwlink/p/?LinkId=251832 (http://go.microsoft.com/fwlink/p/?LinkId=251832).

Parameters

-Url <UrlCmdletPipeBind>

Specifies the full URL of the new site collection. It must be in a valid managed path in the company's site. For example, for company contoso, valid managed paths are https://contoso.sharepoint.com/sites and https://contoso.sharepoint.com/teams.

Aliases

None

Required?

True

Position

1

Default value

Accept pipeline input?

True

Accept wildcard characters?

False

-Owner <String>

Specifies the user name of the site collection's primary owner. The owner must be a user instead of a security group or an email-enabled security group.

Aliases

None

Required?

True

Position

Named

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

-StorageQuota <Int64>

Specifies the storage quota for this site collection in megabytes. This value must not exceed the company's available quota.

Aliases

None

Required?

True

Position

Named

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

-CompatibilityLevel <Int32>

Specifies the version of templates to use when you are creating a new site collection. This value sets the initial CompatibilityLevel value for the site collection. The values for this parameter can be either SharePoint Server 2010 or SharePoint Server 2013. When this parameter is not specified, the CompatibilityLevel will be by default the highest possible version for the Web application.

For SharePoint Online Preview, it can only be set to "14" or "15". "14" indicates SharePoint 2010 Products, "15" indicates SharePoint 2013. Other values are not valid and will cause error.

Aliases

None

Required?

False

Position

Named

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

-LocaleId <UInt32>

Specifies the language of this site collection. For more information, see Locale IDs Assigned by Microsoft (http://go.microsoft.com/fwlink/p/?LinkId=242911) (http://go.microsoft.com/fwlink/p/?LinkId=242911). The Template and LocaleId parameters must be a valid combination as returned from the Get-SPOWebTemplate cmdlet.

Aliases

None

Required?

False

Position

Named

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

-NoWait <SwitchParameter>

Specifies to continue executing script immediately.

Aliases

None

Required?

False

Position

Named

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

-ResourceQuota <Double>

Specifies the quota for this site collection in Sandboxed Solutions units. This value must not exceed the company's aggregate available Sandboxed Solutions quota. The default value is 0. For more information, see Resource Usage Limits on Sandboxed Solutions in SharePoint 2010(http://msdn.microsoft.com/en-us/library/gg615462.aspx) (http://msdn.microsoft.com/en-us/library/gg615462.aspx).

Aliases

None

Required?

False

Position

Named

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

-Template <String>

Specifies the site collection template type. Use the Get-SPOWebTemplate cmdlet to get the list of valid templates. If no template is specified, one can be added later. The Template and LocaleId parameters must be a valid combination as returned from the Get-SPOWebTemplate cmdlet.

Aliases

None

Required?

False

Position

Named

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

-TimeZoneId <Int32>

Specifies the time zone of the site collection. For more information, see SPRegionalSettings.TimeZones Property (http://go.microsoft.com/fwlink/p/?LinkId=242912) (http://go.microsoft.com/fwlink/p/?LinkId=242912).

Aliases

None

Required?

False

Position

Named

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

-Title <String>

Specifies the title of the site collection.

Aliases

None

Required?

False

Position

Named

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

Input Type

Return Type

Notes

None

Examples

--------EXAMPLE 1--------

Example 1 creates a new site collection for the current company with specified site URL, title, and owner. The storage quota is set to 1000 megabytes.

C:\PS>New-SPOSite -Url http://contoso.sharepoint.com/sites/mynewsite -Owner joe.healy@contoso.com -StorageQuota 1000 -Title "My new site collection"

--------EXAMPLE 2--------

Example 2 creates a new site collection for the current company with specified site URL, title, owner, and template. The storage quota is set to 1000 megabytes and the resource quota is set to 300 megabytes. The template compatibility level is set to 15 which means that the site collection only supports theSharePoint 2013 template. The language is set to English - United States (LocaleID = 1033) and the time zone is set to (GMT-08:00) Pacific Time (US and Canada) (TimeZone = 13).

C:\PS>New-SPOSite -Url http://contoso.sharepoint.com/sites/mynewsite -Owner joe.healy@contoso.com -StorageQuota 1000 -CompatibilityLevel 15 -LocaleID 1033 -ResourceQuota 300 -Template "STS#0" -TimeZoneId 13 -Title "My new site collection"

--------EXAMPLE 3--------

Example 3 creates a new site collection for the current company with specified site URL, owner, and template. The storage quota is set to 100 megabytes and the resource quota is set to 50 megabytes. This cmdlet is executed immediately without delay.

C:\PS>New-SPOSite -Url https://contoso.sharepoint.com/sites/accounting -Owner admin@contoso.com -StorageQuota 100 -NoWait -ResourceQuota 50 -Template STS#0

Introduction to the SharePoint Online management shell
Set up the SharePoint Online Management Shell Windows PowerShell environment
Get-SPOSite
Set-SPOSite